[FFmpeg-devel] [PATCH] avformat/vividas: Use signed n in read_sb_block()

Michael Niedermayer michael at niedermayer.cc
Mon Feb 15 22:31:23 EET 2021


Fixes: OOM
Fixes: 27780/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5097985075314688

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index d745770dc4..b172a48b29 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -235,7 +235,7 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned *size,
     uint8_t *buf;
     uint8_t ibuf[8], sbuf[8];
     uint32_t k2;
-    unsigned n;
+    int n;
 
     if (avio_read(src, ibuf, 8) < 8)
         return NULL;
-- 
2.17.1



More information about the ffmpeg-devel mailing list