[FFmpeg-devel] [PATCH 5/5] avformat/vividas: check for tiny blocks using alignment

Michael Niedermayer michael at niedermayer.cc
Sun Sep 1 01:32:40 EEST 2019


Ask for a sample for these
Fixes: out of array access
Fixes: 16624/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5762455661182976

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

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index 075a521cd2..cb4949b4a6 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -153,6 +153,10 @@ static void decode_block(uint8_t *src, uint8_t *dest, unsigned size,
 
     if (align) {
         uint32_t tmpkey = *key_ptr - key;
+        if (a2 > s) {
+            a2 = s;
+            avpriv_request_sample(NULL, "tiny aligned block\n");
+        }
         memcpy(tmp + align, src, a2);
         xor_block(tmp, tmp, 4, key, &tmpkey);
         memcpy(dest, tmp + align, a2);
-- 
2.23.0



More information about the ffmpeg-devel mailing list