avcodec/tiff: check ff_lzw_decode_open() for failure

This commit is contained in:
Paul B Mahol 2018-09-09 11:38:33 +02:00
parent 39cfb722ee
commit 05df39cf3f
1 changed files with 2 additions and 0 deletions

View File

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