[FFmpeg-cvslog] avcodec/scpr: stop checking for overread twice
Paul B Mahol
git at videolan.org
Sun Sep 9 15:15:00 EEST 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 9 14:06:57 2018 +0200| [4b1b47e81b5c031953ed2d466fc659d5e13082b7] | committer: Paul B Mahol
avcodec/scpr: stop checking for overread twice
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b1b47e81b5c031953ed2d466fc659d5e13082b7
---
libavcodec/scpr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index f1584355c0..81597aa4dc 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -136,7 +136,7 @@ static int decode(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigned
rc->range *= freq;
while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) {
- unsigned byte = bytestream2_get_byte(gb);
+ unsigned byte = bytestream2_get_byteu(gb);
rc->code = (rc->code << 8) | byte;
rc->range <<= 8;
}
@@ -172,7 +172,7 @@ static int decode0(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigne
rc->range = rc->range * (uint64_t)(freq + cumFreq) / total_freq - (t + 1);
while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) {
- unsigned byte = bytestream2_get_byte(gb);
+ unsigned byte = bytestream2_get_byteu(gb);
rc->code = (rc->code << 8) | byte;
rc->code1 <<= 8;
rc->range <<= 8;
More information about the ffmpeg-cvslog
mailing list