OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jul 2013 10:01:29 +0000 (12:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jul 2013 10:01:29 +0000 (12:01 +0200)
* qatar/master:
  8bps: Make the bound-checks consistent

Conflicts:
libavcodec/8bps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/8bps.c

@@@ -96,7 -105,7 +96,7 @@@ static int decode_frame(AVCodecContext 
                  if ((count = *dp++) <= 127) {
                      count++;
                      dlen -= count + 1;
-                     if (pixptr + count * planes > pixptr_end)
 -                    if (pixptr_end - pixptr < count * px_inc)
++                    if (pixptr_end - pixptr < count * planes)
                          break;
                      if (ep - dp < count)
                          return AVERROR_INVALIDDATA;
                      }
                  } else {
                      count = 257 - count;
-                     if (pixptr + count * planes > pixptr_end)
 -                    if (pixptr_end - pixptr < count * px_inc)
++                    if (pixptr_end - pixptr < count * planes)
                          break;
                      while (count--) {
                          *pixptr = *dp;