From 67f9bbbb3f6295ca27da7c367f31c6d65339dd4a Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 29 Mar 2013 19:00:16 +0000 Subject: noise_bsf: check if allocation failed Signed-off-by: Paul B Mahol --- libavcodec/noise_bsf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec') 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