From: raster Date: Mon, 18 Jun 2012 13:36:19 +0000 (+0000) Subject: dotn segv if color vals beyond palette size in tg. X-Git-Tag: submit/trunk/20120815.174732~201 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=073e1abeb9affbc7432bdcec493e5308f8abfbc9;p=profile%2Fivi%2Fevas.git dotn segv if color vals beyond palette size in tg. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@72401 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_textgrid.c b/src/lib/canvas/evas_object_textgrid.c index 8a3e2f4..7b98954 100644 --- a/src/lib/canvas/evas_object_textgrid.c +++ b/src/lib/canvas/evas_object_textgrid.c @@ -375,7 +375,8 @@ evas_object_textgrid_render(Evas_Object *obj, void *output, void *context, void { if (cells->bg_extended) palette = o->cur.palette_extended; else palette = o->cur.palette_standard; - c = eina_array_data_get(palette, cells->bg); + if (cells->bg >= eina_array_count(palette)) c = NULL; + else c = eina_array_data_get(palette, cells->bg); if ((c) && (c->a > 0)) { if (!run) @@ -412,7 +413,8 @@ evas_object_textgrid_render(Evas_Object *obj, void *output, void *context, void { if (cells->fg_extended) palette = o->cur.palette_extended; else palette = o->cur.palette_standard; - c = eina_array_data_get(palette, cells->fg); + if (cells->fg >= eina_array_count(palette)) c = NULL; + else c = eina_array_data_get(palette, cells->fg); if ((c) && (c->a > 0)) { evas_object_textgrid_row_text_append(row, obj, o, xp,