From 8a9641a652ed1546fedfda22584f79d3d423096e Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 18 Dec 2014 20:26:56 +0100 Subject: bsf: check memory allocations --- libavcodec/noise_bsf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/noise_bsf.c') 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