atspi: fix integer underflow issue 21/137321/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 5 Jul 2017 08:10:47 +0000 (17:10 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Wed, 5 Jul 2017 08:12:48 +0000 (17:12 +0900)
Change-Id: I99a498b901c0980d62e5c8abaf42687fb54ac335

src/lib/elm_atspi_bridge.c

index a3c834b..7b49d61 100644 (file)
@@ -4539,6 +4539,12 @@ _deputy_of_proxy_in_parent_get(Eo *obj)
      {
         if (eo_isa(child, ELM_ATSPI_PROXY_CLASS))
           {
+             if (index == 0)
+               {
+                  WRN("Proxy does not have deputy object");
+                  break;
+               }
+
              deputy = eina_list_nth(children_list, index - 1);
              break;
           }