diff options
author | Grigori Goronzy <greg@blackbox> | 2010-08-01 05:22:18 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-08-01 05:22:18 +0200 |
commit | 9663b8912334c5c062eee231f5aa9e68c1b81dcf (patch) | |
tree | bf5c75196ed8e35a85bd127efe7234ab2ebad038 /libass | |
parent | 976b42087f0c237061c32ef773e13d0eb62b5c08 (diff) | |
download | libass-9663b8912334c5c062eee231f5aa9e68c1b81dcf.tar.bz2 libass-9663b8912334c5c062eee231f5aa9e68c1b81dcf.tar.xz |
Handle allocation failure of clipped bitmaps
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 974d0ed0..5a1073fc 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 |