summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-03-11 21:53:27 +0100
committerPaul B Mahol <onemda@gmail.com>2020-03-11 21:54:27 +0100
commitb3c46e26aa283bf8e95451f1d4b1810a6f4e1ade (patch)
treea447b7e607e4d4afc82f86e959e8e487d1d36dda /libavcodec/wavpack.c
parent2c08cd284dd1d630a69080f34c58ad41007d5855 (diff)
avcodec/wavpack: check for allocation failure
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c3
1 files changed, 3 insertions, 0 deletions
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;
}