From b3c46e26aa283bf8e95451f1d4b1810a6f4e1ade Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 11 Mar 2020 21:53:27 +0100 Subject: [PATCH] avcodec/wavpack: check for allocation failure --- libavcodec/wavpack.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 0326f15cd6..b27262b94e 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -987,6 +987,9 @@ static int init_thread_copy(AVCodecContext *avctx) s->curr_frame.f = av_frame_alloc(); s->prev_frame.f = av_frame_alloc(); + if (!s->curr_frame.f || !s->prev_frame.f) + return AVERROR(ENOMEM); + return 0; }