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

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


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

avcodec/tiff: check ff_lzw_decode_open() for failure

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

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

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 1b332a754d..cfe0c27714 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1403,6 +1403,8 @@ static av_cold int tiff_init(AVCodecContext *avctx)
     s->subsampling[1] = 1;
     s->avctx  = avctx;
     ff_lzw_decode_open(&s->lzw);
+    if (!s->lzw)
+        return AVERROR(ENOMEM);
     ff_ccitt_unpack_init();
 
     return 0;



More information about the ffmpeg-cvslog mailing list