[FFmpeg-cvslog] avformat/rka: bps < 8 is invalid

Michael Niedermayer git at videolan.org
Sat Jul 22 18:55:08 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr  9 16:01:35 2023 +0200| [167b4f56f187edafd94fa2e706897ac3bb450511] | committer: Michael Niedermayer

avformat/rka: bps < 8 is invalid

Fixes: division by zero
Fixes: 57828/clusterfuzz-testcase-minimized-ffmpeg_dem_RKA_fuzzer-6571818338353152

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

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

 libavformat/rka.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rka.c b/libavformat/rka.c
index 39e5b3bce1..36e25ade01 100644
--- a/libavformat/rka.c
+++ b/libavformat/rka.c
@@ -72,7 +72,7 @@ static int rka_read_header(AVFormatContext *s)
     if (channels == 0)
         return AVERROR_INVALIDDATA;
     bps = par->extradata[13];
-    if (bps == 0)
+    if (bps < 8)
         return AVERROR_INVALIDDATA;
     size_offset = avio_rl32(s->pb);
     framepos = avio_tell(s->pb);



More information about the ffmpeg-cvslog mailing list