1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00

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>
This commit is contained in:
Michael Niedermayer 2024-05-17 23:53:28 +02:00
parent 6df8bd64ff
commit 8814cedb07
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -422,7 +422,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;
}