From 578d9cf7ccd3a98b11dd70199da4f3e6f934e33e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 21 Apr 2013 00:12:14 +0200 Subject: [PATCH] mxf_timestamp_to_str: dont leave uninitilaized fields in time. Fixes CID1005318 Signed-off-by: Michael Niedermayer --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 666e9c1af2..286a884cc7 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1660,7 +1660,7 @@ static int mxf_uid_to_str(UID uid, char **str) static int mxf_timestamp_to_str(uint64_t timestamp, char **str) { - struct tm time; + struct tm time = {0}; time.tm_year = (timestamp >> 48) - 1900; time.tm_mon = (timestamp >> 40 & 0xFF) - 1; time.tm_mday = (timestamp >> 32 & 0xFF);