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/parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/parser.c') diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 6d20516f28..0a5c2cae33 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -193,6 +193,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, *poutbuf_size = size; *poutbuf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!*poutbuf) + return AVERROR(ENOMEM); memcpy(*poutbuf, avctx->extradata, avctx->extradata_size); memcpy(*poutbuf + avctx->extradata_size, buf, -- cgit v1.2.3