From: Subhransu Mohanty Date: Fri, 3 Apr 2015 14:38:14 +0000 (+0200) Subject: evas/canvas : bail out in case of empty or null dash. X-Git-Tag: v1.14.0-alpha1~44^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c31036249ed5c21f249387d785fb85d97b5926e;p=platform%2Fupstream%2Fefl.git evas/canvas : bail out in case of empty or null dash. Signed-off-by: Cedric BAIL --- diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c index 7b7ec01..e67c3b5 100644 --- a/src/lib/evas/canvas/evas_vg_shape.c +++ b/src/lib/evas/canvas/evas_vg_shape.c @@ -199,6 +199,9 @@ _efl_vg_shape_efl_gfx_shape_stroke_dash_set(Eo *obj EINA_UNUSED, pd->stroke.dash = NULL; pd->stroke.dash_count = 0; + // check for null or empty dash + if (!dash || !length) return; + pd->stroke.dash = malloc(sizeof (Efl_Gfx_Dash) * length); if (!pd->stroke.dash) return ;