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:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-15 15:47:12 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-01-15 15:47:12 +0300
commitc5eb725fd33ee705c3c7d674ae65bbb717bf7207 (patch)
tree27998b149b222fdb19fd20fd78b7365a7f1b731a /libavcodec/dump_extradata_bsf.c
parent9fb5a91c66934dab395ff32eb524a3dbe08b53d8 (diff)
parent8a9641a652ed1546fedfda22584f79d3d423096e (diff)
Merge commit '8a9641a652ed1546fedfda22584f79d3d423096e'
* commit '8a9641a652ed1546fedfda22584f79d3d423096e': bsf: check memory allocations Conflicts: libavcodec/noise_bsf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dump_extradata_bsf.c')
-rw-r--r--libavcodec/dump_extradata_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dump_extradata_bsf.c b/libavcodec/dump_extradata_bsf.c
index 2dcbf8fdad..568f920979 100644
--- a/libavcodec/dump_extradata_bsf.c
+++ b/libavcodec/dump_extradata_bsf.c
@@ -37,6 +37,8 @@ static int dump_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx,
int size= buf_size + avctx->extradata_size;
*poutbuf_size= size;
*poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!*poutbuf)
+ return AVERROR(ENOMEM);
memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);