diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-18 20:26:56 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-15 01:25:16 +0100 |
commit | 8a9641a652ed1546fedfda22584f79d3d423096e (patch) | |
tree | c5f13c56aaadf20cece2188e509b430f6ea3061b /libavcodec/imx_dump_header_bsf.c | |
parent | 014b6b416fec89777cb9cff61bcf7896eaf7cf39 (diff) | |
download | ffmpeg-8a9641a652ed1546fedfda22584f79d3d423096e.tar.gz |
bsf: check memory allocations
Diffstat (limited to 'libavcodec/imx_dump_header_bsf.c')
-rw-r--r-- | libavcodec/imx_dump_header_bsf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c index 5f5493f5a8..5c647c4d68 100644 --- a/libavcodec/imx_dump_header_bsf.c +++ b/libavcodec/imx_dump_header_bsf.c @@ -43,6 +43,8 @@ static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx } *poutbuf = av_malloc(buf_size + 20 + FF_INPUT_BUFFER_PADDING_SIZE); + if (!*poutbuf) + return AVERROR(ENOMEM); poutbufp = *poutbuf; bytestream_put_buffer(&poutbufp, imx_header, 16); bytestream_put_byte(&poutbufp, 0x83); /* KLV BER long form */ |