Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 22:26:56 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-01-15 03:25:16 +0300
commit8a9641a652ed1546fedfda22584f79d3d423096e (patch)
treec5f13c56aaadf20cece2188e509b430f6ea3061b /libavcodec/mjpega_dump_header_bsf.c
parent014b6b416fec89777cb9cff61bcf7896eaf7cf39 (diff)
bsf: check memory allocations
Diffstat (limited to 'libavcodec/mjpega_dump_header_bsf.c')
-rw-r--r--libavcodec/mjpega_dump_header_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c
index ed32d5a48f..1bcb9e7223 100644
--- a/libavcodec/mjpega_dump_header_bsf.c
+++ b/libavcodec/mjpega_dump_header_bsf.c
@@ -45,6 +45,8 @@ static int mjpega_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *av
*poutbuf_size = 0;
*poutbuf = av_malloc(buf_size + 44 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!*poutbuf)
+ return AVERROR(ENOMEM);
poutbufp = *poutbuf;
bytestream_put_byte(&poutbufp, 0xff);
bytestream_put_byte(&poutbufp, SOI);