You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
8bps: Make the bound-checks consistent
This commit is contained in:
@@ -105,7 +105,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
if ((count = *dp++) <= 127) {
|
if ((count = *dp++) <= 127) {
|
||||||
count++;
|
count++;
|
||||||
dlen -= count + 1;
|
dlen -= count + 1;
|
||||||
if (pixptr + count * px_inc > pixptr_end)
|
if (pixptr_end - pixptr < count * px_inc)
|
||||||
break;
|
break;
|
||||||
if (ep - dp < count)
|
if (ep - dp < count)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
@@ -115,7 +115,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
count = 257 - count;
|
count = 257 - count;
|
||||||
if (pixptr + count * px_inc > pixptr_end)
|
if (pixptr_end - pixptr < count * px_inc)
|
||||||
break;
|
break;
|
||||||
while (count--) {
|
while (count--) {
|
||||||
*pixptr = *dp;
|
*pixptr = *dp;
|
||||||
|
Reference in New Issue
Block a user