summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-08-01 05:22:18 +0200
committerGrigori Goronzy <greg@blackbox>2010-08-01 05:22:18 +0200
commit9663b8912334c5c062eee231f5aa9e68c1b81dcf (patch)
treebf5c75196ed8e35a85bd127efe7234ab2ebad038
parent976b42087f0c237061c32ef773e13d0eb62b5c08 (diff)
downloadlibass-9663b8912334c5c062eee231f5aa9e68c1b81dcf.tar.bz2
libass-9663b8912334c5c062eee231f5aa9e68c1b81dcf.tar.xz
Handle allocation failure of clipped bitmaps
-rw-r--r--libass/ass_render.c2
1 files changed, 2 insertions, 0 deletions
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