From: discomfitor Date: Fri, 14 Jan 2011 06:28:40 +0000 (+0000) Subject: add calloc check to avoid null deref X-Git-Tag: 2.0_alpha~240^2~1285 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f87570097eff53430c97f832c68234ef8e267530;p=framework%2Fuifw%2Fevas.git add calloc check to avoid null deref git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56098 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_font_draw.c b/src/lib/engines/common/evas_font_draw.c index 1d48943..6adcb18 100644 --- a/src/lib/engines/common/evas_font_draw.c +++ b/src/lib/engines/common/evas_font_draw.c @@ -184,6 +184,7 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph) fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2)); if (!fash->bucket[grp]->bucket[maj]) fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map)); + EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); fash->bucket[grp]->bucket[maj]->item[min] = glyph; }