From 2493558a06402b1bc1a17f139e517bcd39382ba1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 14 Jan 2015 13:23:20 +0100 Subject: [PATCH] avcodec/svq3: Check av_mallocs return value Signed-off-by: Michael Niedermayer --- libavcodec/svq3.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 9459329058..5fa370a4d2 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1008,6 +1008,10 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx) } buf = av_malloc(buf_len); + if (!buf) { + ret = AVERROR(ENOMEM); + goto fail; + } av_log(avctx, AV_LOG_DEBUG, "watermark size: %ux%u\n", watermark_width, watermark_height); av_log(avctx, AV_LOG_DEBUG,