]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:lib: Initialize ‘tm’ structure
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 20 Sep 2023 05:04:58 +0000 (17:04 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 27 Sep 2023 02:43:28 +0000 (02:43 +0000)
‘tm’ must be initialized prior to calling strptime().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/lib/util_path.c

index 9c9c6eb580733b38ae1c07fe615c57c8d9e0b5ab..a7d1a8b132855e85554be1e9bdc724fd28bf9d10 100644 (file)
@@ -215,7 +215,7 @@ static bool find_snapshot_token(
 {
        const char *start = NULL;
        const char *end = NULL;
-       struct tm tm;
+       struct tm tm = {};
        time_t t;
 
        start = strstr_m(filename, "@GMT-");