[FFmpeg-cvslog] avformat/mov: zero initialize codec_name in mov_parse_stsd_video()

James Almer git at videolan.org
Sun Nov 13 01:53:49 EET 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Nov 12 20:52:22 2016 -0300| [66453b1fba6c68f2f7f5117355d34b5f40910327] | committer: James Almer

avformat/mov: zero initialize codec_name in mov_parse_stsd_video()

Fixes valgrind warning about "Conditional jump or move depends on uninitialised value(s)"

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9ec7d03..17d63d6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1832,7 +1832,7 @@ static int mov_codec_id(AVStream *st, uint32_t format)
 static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
                                  AVStream *st, MOVStreamContext *sc)
 {
-    uint8_t codec_name[32];
+    uint8_t codec_name[32] = { 0 };
     int64_t stsd_start;
     unsigned int len;
 



More information about the ffmpeg-cvslog mailing list