From 401d68ada68f20d0c9e4994a2a38dfc5fce4d825 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 6 Jul 2012 14:03:38 +0000 Subject: [PATCH] evas: catch bad map early on. SVN revision: 73416 --- legacy/evas/ChangeLog | 5 +++++ legacy/evas/NEWS | 1 + legacy/evas/src/lib/canvas/evas_map.c | 5 +---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index 2618a14129..8a3c41449a 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -868,3 +868,8 @@ 2012-07-05 Cedric Bail * Strongly disable Evas pipe rendering. + +2012-07-05 Cedric Bail + + * Don't let bad map sneek at render time and ban them as early as possible. + diff --git a/legacy/evas/NEWS b/legacy/evas/NEWS index de23f5d8ed..319e39edd1 100644 --- a/legacy/evas/NEWS +++ b/legacy/evas/NEWS @@ -20,6 +20,7 @@ Improvements: Fixes: * Add missing files in the tarball. * Add svg rendering with Esvg + * Don't accept broken map. Removal: * Remove EVAS_FRAME_QUEUING, EVAS_SLI, METRIC_CACHE and WORD_CACHE. diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c index f402db77c9..3bb3008718 100644 --- a/legacy/evas/src/lib/canvas/evas_map.c +++ b/legacy/evas/src/lib/canvas/evas_map.c @@ -453,7 +453,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map) return; MAGIC_CHECK_END(); - if (!map) + if (!map || map->count < 4) { if (obj->cur.map) { @@ -1059,9 +1059,6 @@ evas_object_map_update(Evas_Object *obj, obj->spans = NULL; } - if (!((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap))) - return ; - if (!obj->spans) obj->spans = calloc(1, sizeof (RGBA_Map) + sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1));