backport vtorri fix! :)
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 10 Nov 2012 01:39:20 +0000 (01:39 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 10 Nov 2012 01:39:20 +0000 (01:39 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/branches/evas-1.7@79072 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/lib/canvas/evas_object_box.c

index f744fd8..f755b7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * Fix evas textblock tag parser to respect escaped spaces and
          escaped single quotes. This fixes an edje text class restyling bug.
+
+2012-11-09  Vincent Torri
+
+       * Fixed longstanding memset bug in evas box.
diff --git a/NEWS b/NEWS
index fc9d0dd..aff3caf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Changes since Evas 1.7.1
 
 Fixes:
    * Fix evas textblock tag parser to respect escaped spaces and escaped single quotes
+   * Fixed longstanding memset bug in evas box.
 
 Changes since Evas 1.7.0:
 -------------------------
index e29c5f5..f36864f 100644 (file)
@@ -1382,16 +1382,10 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
 
    /* *per row* arrays */
    row_max_h = (int *)alloca(sizeof(int) * n_children);
-   if (!row_max_h)
-     return;
    row_break = (int *)alloca(sizeof(int) * n_children);
-   if (!row_break)
-     return;
    row_width = (int *)alloca(sizeof(int) * n_children);
-   if (!row_width)
-     return;
 
-   memset(row_width, 0, sizeof(row_width));
+   memset(row_width, 0, sizeof(int) * n_children);
 
    evas_object_geometry_get(o, &x, &y, &w, &h);
 
@@ -1562,16 +1556,10 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
 
    /* *per col* arrays */
    col_max_w = (int *)alloca(sizeof(int) * n_children);
-   if (!col_max_w)
-     return;
    col_break = (int *)alloca(sizeof(int) * n_children);
-   if (!col_break)
-     return;
    col_height = (int *)alloca(sizeof(int) * n_children);
-   if (!col_height)
-     return;
 
-   memset(col_height, 0, sizeof(col_height));
+   memset(col_height, 0, sizeof(int) * n_children);
 
    evas_object_geometry_get(o, &x, &y, &w, &h);