summaryrefslogtreecommitdiff
path: root/libavcodec/noise_bsf.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-03-29 19:00:16 +0000
committerPaul B Mahol <onemda@gmail.com>2013-03-29 19:00:16 +0000
commit67f9bbbb3f6295ca27da7c367f31c6d65339dd4a (patch)
tree11d55c2bb25cdc439e1fe3b3fc2810795b4fa86c /libavcodec/noise_bsf.c
parent8263726c69cffa02dadac6943be3b75617b46f17 (diff)
downloadffmpeg-67f9bbbb3f6295ca27da7c367f31c6d65339dd4a.tar.gz
noise_bsf: check if allocation failed
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/noise_bsf.c')
-rw-r--r--libavcodec/noise_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c
index 763af791cb..c91e85bc83 100644
--- a/libavcodec/noise_bsf.c
+++ b/libavcodec/noise_bsf.c
@@ -36,6 +36,8 @@ static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const ch
return AVERROR(EINVAL);
*poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!*poutbuf)
+ return AVERROR(ENOMEM);
memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
for(i=0; i<buf_size; i++){