diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-05 02:21:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-12 22:42:18 +0200 |
commit | 69dcd123f19acf851f85166159a3719565813fd0 (patch) | |
tree | 85d585f816a2418c0db34342318c8a2d5b58b836 | |
parent | 96fd9417e250540f228d1ad5b43a77c120208eba (diff) | |
download | ffmpeg-69dcd123f19acf851f85166159a3719565813fd0.tar.gz |
avcodec/cri: Check length
Fixes: CID1604394 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/cri.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cri.c b/libavcodec/cri.c index 7b9a350967..6932bb6745 100644 --- a/libavcodec/cri.c +++ b/libavcodec/cri.c @@ -234,10 +234,14 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p, s->data_size = length; goto skip; case 105: + if (length <= 0) + return AVERROR_INVALIDDATA; hflip = bytestream2_get_byte(gb) != 0; length--; goto skip; case 106: + if (length <= 0) + return AVERROR_INVALIDDATA; vflip = bytestream2_get_byte(gb) != 0; length--; goto skip; |