edje: fix unitialized buffer.
authorcedric <cedric>
Wed, 5 Sep 2012 07:15:10 +0000 (07:15 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 5 Sep 2012 07:15:10 +0000 (07:15 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@76168 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc_parse.c

index e87047a..4df9110 100644 (file)
@@ -501,10 +501,10 @@ stack_pop(void)
         char *hierarchy;
         char *lookup;
 
-        hierarchy = alloca(eina_strbuf_length_get(stack_buf));
+        hierarchy = alloca(eina_strbuf_length_get(stack_buf) + 1);
         memcpy(hierarchy,
                eina_strbuf_string_get(stack_buf),
-               eina_strbuf_length_get(stack_buf));
+               eina_strbuf_length_get(stack_buf) + 1);
 
         /* This is nasty, but it's the way to get parts.part when they are collapsed together. still not perfect */
         lookup = strrchr(hierarchy + eina_strbuf_length_get(stack_buf) - tmp_length, '.');