summaryrefslogtreecommitdiff
path: root/libavcodec/aac_adtstoasc_bsf.c
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2015-02-11 03:37:40 +0530
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-02-17 12:18:10 -0500
commit18f4fa251b0eb36392839f5bf6180f280dc04d8d (patch)
tree2a593667426c3b17c144bbc1fc3673119614c3af /libavcodec/aac_adtstoasc_bsf.c
parentfe0f4e56577a2dbd373bb50b0ae2d49e69d822fc (diff)
aac_adtstoasc_bsf: Check extradata memory allocation
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/aac_adtstoasc_bsf.c')
-rw-r--r--libavcodec/aac_adtstoasc_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
index 733b08d567..bedaa4961b 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);