[FFmpeg-cvslog] avcodec/snowdec: Fix off by 1 error
Michael Niedermayer
git at videolan.org
Thu Oct 26 20:08:53 EEST 2017
ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Thu Aug 17 20:32:03 2017 +0200| [f7509e9fce7a9a8fc65b3b31b96729497bb37177] | committer: Michael Niedermayer
avcodec/snowdec: Fix off by 1 error
Fixes: runtime error: index 4 out of bounds for type 'int8_t [4]'
Fixes: 3023/clusterfuzz-testcase-minimized-6421736130084864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit d132683ddd4050d3fe103ca88c73258c3442dc34)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7509e9fce7a9a8fc65b3b31b96729497bb37177
---
libavcodec/snowdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index 7d6d7ff44f..4ebfa07c6a 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -355,7 +355,7 @@ static int decode_header(SnowContext *s){
Plane *p= &s->plane[plane_index];
p->diag_mc= get_rac(&s->c, s->header_state);
htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2;
- if((unsigned)htaps > HTAPS_MAX || htaps==0)
+ if((unsigned)htaps >= HTAPS_MAX || htaps==0)
return AVERROR_INVALIDDATA;
p->htaps= htaps;
for(i= htaps/2; i; i--){
More information about the ffmpeg-cvslog
mailing list