Fixes: signed integer overflow: 155 + 9223372036854775655 cannot be represented 
in type 'long'
Fixes: 
51896/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5364032278495232

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavformat/wavdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 97e69ab2ee4..b145e980414 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -767,6 +767,8 @@ smv_out:
                 goto smv_retry;
             return AVERROR_EOF;
         }
+        if (INT64_MAX - left < avio_tell(s->pb))
+            return AVERROR_INVALIDDATA;
         wav->data_end = avio_tell(s->pb) + left;
     }
 
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to