avcodec/gifdec: check ff_lzw_decode_open() for failure
authorPaul B Mahol <onemda@gmail.com>
Sun, 9 Sep 2018 09:33:17 +0000 (11:33 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 9 Sep 2018 09:33:17 +0000 (11:33 +0200)
libavcodec/gifdec.c

index 2eeed4c..a3116e4 100644 (file)
@@ -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;
 }