Browse Source

avcodec/dvbsubdec: use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 11 years ago
parent
commit
994a582a02
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libavcodec/dvbsubdec.c

+ 1 - 1
libavcodec/dvbsubdec.c

@@ -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]));