From: Grigori Goronzy Date: Sun, 1 Aug 2010 03:22:18 +0000 (+0200) Subject: Handle allocation failure of clipped bitmaps X-Git-Tag: 0.9.10~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9663b8912334c5c062eee231f5aa9e68c1b81dcf;p=libass Handle allocation failure of clipped bitmaps --- diff --git a/libass/ass_render.c b/libass/ass_render.c index 974d0ed..5a1073f 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -661,6 +661,7 @@ static void blend_vector_clip(ASS_Renderer *render_priv, // Allocate new buffer and add to free list nbuffer = malloc(as * ah); + if (!nbuffer) goto blend_vector_exit; free_list_add(render_priv, nbuffer); // Blend together @@ -681,6 +682,7 @@ static void blend_vector_clip(ASS_Renderer *render_priv, // Allocate new buffer and add to free list nbuffer = calloc(as, ah); + if (!nbuffer) goto blend_vector_exit; free_list_add(render_priv, nbuffer); // Blend together