[FFmpeg-cvslog] avformat/rmdec: check that buf if completely filled
Michael Niedermayer
git at videolan.org
Fri May 16 20:58:34 EEST 2025
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Fri Aug 16 14:47:42 2024 +0200| [12c9288d4769815440d2969e1645a5293c9e0386] | committer: Michael Niedermayer
avformat/rmdec: check that buf if completely filled
Fixes: use of uninitialized value
Fixes: 70988/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5298245077630976
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9578c135d00dd9cc01491b8559d7fad5a387e90d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12c9288d4769815440d2969e1645a5293c9e0386
---
libavformat/rmdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 9dcf4e308b..a2ff061c9b 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -188,7 +188,8 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
st->codecpar->channels = avio_rb16(pb);
if (version == 5) {
ast->deint_id = avio_rl32(pb);
- avio_read(pb, buf, 4);
+ if (avio_read(pb, buf, 4) != 4)
+ return AVERROR_INVALIDDATA;
buf[4] = 0;
} else {
AV_WL32(buf, 0);
More information about the ffmpeg-cvslog
mailing list