mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 20:02:42 +00:00
8bps: Make the bound-checks consistent
This commit is contained in:
parent
bd7b4da0f4
commit
6fd221e5f8
@ -105,7 +105,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
if ((count = *dp++) <= 127) {
|
||||
count++;
|
||||
dlen -= count + 1;
|
||||
if (pixptr + count * px_inc > pixptr_end)
|
||||
if (pixptr_end - pixptr < count * px_inc)
|
||||
break;
|
||||
if (ep - dp < count)
|
||||
return AVERROR_INVALIDDATA;
|
||||
@ -115,7 +115,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
} else {
|
||||
count = 257 - count;
|
||||
if (pixptr + count * px_inc > pixptr_end)
|
||||
if (pixptr_end - pixptr < count * px_inc)
|
||||
break;
|
||||
while (count--) {
|
||||
*pixptr = *dp;
|
||||
|
Loading…
Reference in New Issue
Block a user