diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 80f3757f1e..846d817cdc 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -457,7 +457,8 @@ static void unpack_gray(TiffContext *s, AVFrame *p, GetBitContext gb; uint16_t *dst = (uint16_t *)(p->data[0] + lnum * p->linesize[0]); - init_get_bits8(&gb, src, width); + int ret = init_get_bits8(&gb, src, width); + av_assert1(ret >= 0); for (int i = 0; i < s->width; i++) { dst[i] = get_bits(&gb, bpp);