summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>2020-03-27 11:33:06 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-03-27 13:15:50 +0100
commitd82f530e77ff282ceecca3e73b42209d2d090b02 (patch)
treedcfbf960f33159db50ccfe345bbc3e14b23a044e
parent692d697cc3b530443949de60c507a4038b02db01 (diff)
elm_atspi_bridge: fix bugs reported by coverity
Prevent usage of uninitilized values. CID: 1421995, 1421997, 1422001 Signed-off-by: Bartlomiej Grzelewski <b.grzelewski@samsung.com> Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11612
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index 1a1ccc60a6..23cbd98a97 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -1349,6 +1349,8 @@ _text_string_at_offset_get(const Eldbus_Service_Interface *iface, const Eldbus_M
1349 } 1349 }
1350 1350
1351 str = efl_text_cursor_range_text_get(sel1, sel2); 1351 str = efl_text_cursor_range_text_get(sel1, sel2);
1352 start = efl_text_cursor_position_get(sel1);
1353 end = efl_text_cursor_position_get(sel2);
1352 1354
1353 efl_del(sel1); 1355 efl_del(sel1);
1354 efl_del(sel2); 1356 efl_del(sel2);
@@ -1537,8 +1539,9 @@ _text_attribute_value_get(const Eldbus_Service_Interface *iface, const Eldbus_Me
1537 { 1539 {
1538 Efl_Text_Cursor *sel1 = efl_ui_textbox_cursor_create(obj); 1540 Efl_Text_Cursor *sel1 = efl_ui_textbox_cursor_create(obj);
1539 Efl_Text_Cursor *sel2 = efl_ui_textbox_cursor_create(obj); 1541 Efl_Text_Cursor *sel2 = efl_ui_textbox_cursor_create(obj);
1542 end = start+1;
1540 efl_text_cursor_position_set(sel1, start); 1543 efl_text_cursor_position_set(sel1, start);
1541 efl_text_cursor_position_set(sel2, start+1); 1544 efl_text_cursor_position_set(sel2, end);
1542 annotations = efl_text_formatter_range_attributes_get(sel1, sel2); 1545 annotations = efl_text_formatter_range_attributes_get(sel1, sel2);
1543 1546
1544 if (annotations) 1547 if (annotations)
@@ -1610,8 +1613,9 @@ _text_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
1610 Efl_Text_Cursor *sel1 = efl_ui_textbox_cursor_create(obj); 1613 Efl_Text_Cursor *sel1 = efl_ui_textbox_cursor_create(obj);
1611 Efl_Text_Cursor *sel2 = efl_ui_textbox_cursor_create(obj); 1614 Efl_Text_Cursor *sel2 = efl_ui_textbox_cursor_create(obj);
1612 1615
1616 end = start+1;
1613 efl_text_cursor_position_set(sel1, start); 1617 efl_text_cursor_position_set(sel1, start);
1614 efl_text_cursor_position_set(sel2, start+1); 1618 efl_text_cursor_position_set(sel2, end);
1615 annotations = efl_text_formatter_range_attributes_get(sel1, sel2); 1619 annotations = efl_text_formatter_range_attributes_get(sel1, sel2);
1616 1620
1617 efl_del(sel1); 1621 efl_del(sel1);