avcodec/ass: Use av_realloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 17:57:37 +0000 (18:57 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 19:33:53 +0000 (20:33 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ass.c

index 3a37cee..ea247f8 100644 (file)
@@ -154,7 +154,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
     if (!av_bprint_is_complete(&buf))
         goto errnomem;
 
-    rects = av_realloc(sub->rects, (sub->num_rects+1) * sizeof(*sub->rects));
+    rects = av_realloc_array(sub->rects, (sub->num_rects+1), sizeof(*sub->rects));
     if (!rects)
         goto errnomem;
     sub->rects = rects;