mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/dvbsubdec: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ea8e089ff7
commit
994a582a02
@ -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]));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user