summaryrefslogtreecommitdiff
path: root/libavcodec/noise_bsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/noise_bsf.c')
-rw-r--r--libavcodec/noise_bsf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c
index 3e552e29f8..00ceeadfec 100644
--- a/libavcodec/noise_bsf.c
+++ b/libavcodec/noise_bsf.c
@@ -33,7 +33,8 @@ static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const ch
int i;
*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++){
(*state) += (*poutbuf)[i] + 1;