[FFmpeg-cvslog] aac_adtstoasc_bsf: Check extradata memory allocation
Himangi Saraogi
git at videolan.org
Tue Feb 17 23:05:46 CET 2015
ffmpeg | branch: master | Himangi Saraogi <himangi774 at gmail.com> | Wed Feb 11 03:55:40 2015 +0530| [18f4fa251b0eb36392839f5bf6180f280dc04d8d] | committer: Vittorio Giovara
aac_adtstoasc_bsf: Check extradata memory allocation
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18f4fa251b0eb36392839f5bf6180f280dc04d8d
---
libavcodec/aac_adtstoasc_bsf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
index 733b08d..bedaa49 100644
--- a/libavcodec/aac_adtstoasc_bsf.c
+++ b/libavcodec/aac_adtstoasc_bsf.c
@@ -89,6 +89,8 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
}
avctx->extradata_size = 2 + pce_size;
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!avctx->extradata)
+ return AVERROR(ENOMEM);
init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
put_bits(&pb, 5, hdr.object_type);
More information about the ffmpeg-cvslog
mailing list