diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-17 23:58:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-28 03:48:07 +0200 |
commit | a287f17db22c0c85f0445a1d31139cc70e73205e (patch) | |
tree | c15779cdecfa25d3335a297c26a67ca1cd016927 /libavcodec | |
parent | 8814cedb079d5827e07a92e9424c2314bd0a6047 (diff) | |
download | ffmpeg-a287f17db22c0c85f0445a1d31139cc70e73205e.tar.gz |
avcodec/tiff: Assert init_get_bits8() success in unpack_gray()
Helps: CID1441939 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tiff.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |