1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

aac_adtstoasc_bsf: Check extradata memory allocation

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
Himangi Saraogi 2015-02-11 03:37:40 +05:30 committed by Vittorio Giovara
parent fe0f4e5657
commit 18f4fa251b

View File

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