Skip to content
Snippets Groups Projects
Commit 18f4fa25 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Vittorio Giovara
Browse files

aac_adtstoasc_bsf: Check extradata memory allocation

parent fe0f4e56
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,8 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc, ...@@ -89,6 +89,8 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
} }
avctx->extradata_size = 2 + pce_size; avctx->extradata_size = 2 + pce_size;
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_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); init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
put_bits(&pb, 5, hdr.object_type); put_bits(&pb, 5, hdr.object_type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment