ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Wed Mar 11 21:53:27 
2020 +0100| [b3c46e26aa283bf8e95451f1d4b1810a6f4e1ade] | committer: Paul B Mahol

avcodec/wavpack: check for allocation failure

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3c46e26aa283bf8e95451f1d4b1810a6f4e1ade
---

 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;
 }
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to