From b797a00f634686b6a1752cbb55a7c95d361fa838 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 21 Dec 2013 12:52:23 +0100 Subject: [PATCH] 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 --- libavformat/rmdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index b0876fe5bd..a8af378a8e 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 */