From 73953df71a28e94d8959facba7906cf5975ca4ef Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 20 Jun 2014 00:04:36 +0200 Subject: Replace av_malloc() and memset(0) by av_mallocz() --- libavformat/rmdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavformat/rmdec.c') diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index eb0f3c5ff0..79a07566de 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -86,11 +86,10 @@ static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned si { if (size >= 1<<24) return -1; - avctx->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); + avctx->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE); if (!avctx->extradata) return AVERROR(ENOMEM); avctx->extradata_size = avio_read(pb, avctx->extradata, size); - memset(avctx->extradata + avctx->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); if (avctx->extradata_size != size) return AVERROR(EIO); return 0; -- cgit v1.2.3