rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=72bcb43dcbfcd664c43eef39f084224cd1b3fe1e

commit 72bcb43dcbfcd664c43eef39f084224cd1b3fe1e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Feb 3 12:12:05 2016 +0200

    live_popup: fix possible out of bounds
---
 src/bin/ui/live_view/elementary/live_popup.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/live_view/elementary/live_popup.c 
b/src/bin/ui/live_view/elementary/live_popup.c
index 92551b1..e825b80 100644
--- a/src/bin/ui/live_view/elementary/live_popup.c
+++ b/src/bin/ui/live_view/elementary/live_popup.c
@@ -29,10 +29,15 @@ _on_popup_swallow_check(void *data,
    Evas_Object *content;
    char *pointer = NULL;
    Eina_Stringshare *but_swallow = NULL, *title_swallow = NULL;
+   int num;
 
+   TODO("recheck this logic");
    pointer = strstr(part->name, "button");
-   if (pointer) but_swallow = eina_stringshare_printf("button%c",
-                                                      pointer[sizeof(pointer) 
- 2]);
+   if ((pointer) && (strlen(pointer) == strlen("button") + 1))
+     {
+        num = atoi(pointer + strlen("button"));
+        but_swallow = eina_stringshare_printf("button%d", num);
+     }
    if (!strcmp(part->name, "elm.swallow.title.icon"))
      title_swallow = eina_stringshare_add("title,icon");
 

-- 


Reply via email to