Commit 7dec8512 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  8bps: Make the bound-checks consistent

Conflicts:
	libavcodec/8bps.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents da0f67b1 6fd221e5
......@@ -96,7 +96,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
if ((count = *dp++) <= 127) {
count++;
dlen -= count + 1;
if (pixptr + count * planes > pixptr_end)
if (pixptr_end - pixptr < count * planes)
break;
if (ep - dp < count)
return AVERROR_INVALIDDATA;
......@@ -106,7 +106,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
}
} else {
count = 257 - count;
if (pixptr + count * planes > pixptr_end)
if (pixptr_end - pixptr < count * planes)
break;
while (count--) {
*pixptr = *dp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment