[FFmpeg-cvslog] avformat/rmdec: zero string destination before use

Michael Niedermayer git at videolan.org
Sat Dec 21 23:37:13 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 21 12:52:23 2013 +0100| [b797a00f634686b6a1752cbb55a7c95d361fa838] | committer: Michael Niedermayer

avformat/rmdec: zero string destination before use

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9677850d99_4635_crashed.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/rmdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index b0876fe..a8af378 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -185,6 +185,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
             avio_read(pb, buf, 4);
             buf[4] = 0;
         } else {
+            AV_WL32(buf, 0);
             get_str8(pb, buf, sizeof(buf)); /* desc */
             ast->deint_id = AV_RL32(buf);
             get_str8(pb, buf, sizeof(buf)); /* desc */



More information about the ffmpeg-cvslog mailing list