avcodec/tiff: Assert init_get_bits8() success in horizontal_fill()

Helps: CID1441167 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8814cedb07)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.1
Michael Niedermayer 8 months ago
parent 6b89f87fd9
commit c8907643fb
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      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;
}

Loading…
Cancel
Save