[FFmpeg-devel] [PATCH 1/9] avcodec/tiff: Assert init_get_bits8() success in horizontal_fill()
Michael Niedermayer
michael at niedermayer.cc
Sat May 18 06:57:35 EEST 2024
Helps: CID1441167 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/tiff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 19301d9e490..ca7e9f6aba9 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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;
}
--
2.45.1
More information about the ffmpeg-devel
mailing list