Browse Source

aac_adtstoasc_bsf: Check extradata memory allocation

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
tags/n2.6
Himangi Saraogi Vittorio Giovara 10 years ago
parent
commit
18f4fa251b
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/aac_adtstoasc_bsf.c

+ 2
- 0
libavcodec/aac_adtstoasc_bsf.c 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);


Loading…
Cancel
Save