diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 0300316d3c..95b94d1f8f 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -704,7 +704,7 @@ static int avi_read_header(AVFormatContext *s) if(size<(1<<30)){ st->codec->extradata_size= size; - st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); + st->codec->extradata= av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) { st->codec->extradata_size= 0; return AVERROR(ENOMEM);