[FFmpeg-cvslog] avcodec/rangecoder: Fix range coder corner case handling

Michael Niedermayer git at videolan.org
Sat May 13 03:12:00 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat May 13 01:45:29 2017 +0200| [96cbaaa5481baa020eb0cb6faac83e4c5059b212] | committer: Michael Niedermayer

avcodec/rangecoder: Fix range coder corner case handling

Fixes: 1511/clusterfuzz-testcase-minimized-5906663800307712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96cbaaa5481baa020eb0cb6faac83e4c5059b212
---

 libavcodec/rangecoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c
index d7a2774d27..0bb79c880e 100644
--- a/libavcodec/rangecoder.c
+++ b/libavcodec/rangecoder.c
@@ -60,7 +60,7 @@ av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf,
     c->bytestream += 2;
     if (c->low >= 0xFF00) {
         c->low = 0xFF00;
-        c->bytestream_end = c->bytestream + 2;
+        c->bytestream_end = c->bytestream;
     }
 }
 



More information about the ffmpeg-cvslog mailing list