avcodec/dvbsubdec: use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Apr 2014 18:00:28 +0000 (20:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Apr 2014 18:08:30 +0000 (20:08 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dvbsubdec.c

index 4f408fe..9d74b1a 100644 (file)
@@ -1394,7 +1394,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
     }
 
     if (sub->num_rects > 0){
-        sub->rects = av_mallocz(sizeof(*sub->rects) * sub->num_rects);
+        sub->rects = av_mallocz_array(sizeof(*sub->rects), sub->num_rects);
         for(i=0; i<sub->num_rects; i++)
             sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));