diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index adb49e4525..593188c824 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -427,7 +427,8 @@ static void av_always_inline horizontal_fill(TiffContext *s, uint8_t shift = is_dng ? 0 : 16 - bpp; GetBitContext gb; - 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++) { dst16[i] = get_bits(&gb, bpp) << shift; }