avcodec/gifdec: check ff_lzw_decode_open() for failure

This commit is contained in:
Paul B Mahol 2018-09-09 11:33:17 +02:00
parent 4cfb01d6ae
commit 158043bae8
1 changed files with 2 additions and 0 deletions

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