[FFmpeg-cvslog] avcodec/gifdec: check ff_lzw_decode_open() for failure

Paul B Mahol git at videolan.org
Sun Sep 9 12:41:36 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  9 11:33:17 2018 +0200| [158043bae84bdcb988ecf423bf4b2eea5b12fb6e] | committer: Paul B Mahol

avcodec/gifdec: check ff_lzw_decode_open() for failure

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

 libavcodec/gifdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 2eeed4c4c7..a3116e417e 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -451,6 +451,8 @@ static av_cold int gif_decode_init(AVCodecContext *avctx)
     if (!s->frame)
         return AVERROR(ENOMEM);
     ff_lzw_decode_open(&s->lzw);
+    if (!s->lzw)
+        return AVERROR(ENOMEM);
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list