diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-03-29 19:00:16 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-03-29 19:00:16 +0000 |
commit | 67f9bbbb3f6295ca27da7c367f31c6d65339dd4a (patch) | |
tree | 11d55c2bb25cdc439e1fe3b3fc2810795b4fa86c | |
parent | 8263726c69cffa02dadac6943be3b75617b46f17 (diff) | |
download | ffmpeg-67f9bbbb3f6295ca27da7c367f31c6d65339dd4a.tar.gz |
noise_bsf: check if allocation failed
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavcodec/noise_bsf.c | 2 |
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++){ |