diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 12:01:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 12:01:29 +0200 |
commit | 7dec8512be12675e84213c744c1aa511bed4d057 (patch) | |
tree | d4a24c9cd1eb9223e65ca658c4b2d916d79bca64 /libavcodec/8bps.c | |
parent | da0f67b177adaa3f792038bff174d015da1179a4 (diff) | |
parent | 6fd221e5f8b0dcd33c249e553ea0be87778f2479 (diff) | |
download | ffmpeg-7dec8512be12675e84213c744c1aa511bed4d057.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
8bps: Make the bound-checks consistent
Conflicts:
libavcodec/8bps.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/8bps.c')
-rw-r--r-- | libavcodec/8bps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index 2c03e8b4a3..c46c8c1c00 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -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; |