mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/cri: Check length
Fixes: CID1604394 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
96fd9417e2
commit
69dcd123f1
@ -234,10 +234,14 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
|||||||
s->data_size = length;
|
s->data_size = length;
|
||||||
goto skip;
|
goto skip;
|
||||||
case 105:
|
case 105:
|
||||||
|
if (length <= 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
hflip = bytestream2_get_byte(gb) != 0;
|
hflip = bytestream2_get_byte(gb) != 0;
|
||||||
length--;
|
length--;
|
||||||
goto skip;
|
goto skip;
|
||||||
case 106:
|
case 106:
|
||||||
|
if (length <= 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
vflip = bytestream2_get_byte(gb) != 0;
|
vflip = bytestream2_get_byte(gb) != 0;
|
||||||
length--;
|
length--;
|
||||||
goto skip;
|
goto skip;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user