]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:audit_logging: Initialize ‘tm’ structure
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 20 Sep 2023 05:04:00 +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>
lib/audit_logging/tests/audit_logging_test.c

index d41f9517c4770df744b9ab9b682461f32035c9c0..09238823399f2ddc9dc0c6c5a87fbda8cabeaa6c 100644 (file)
@@ -830,7 +830,7 @@ static void test_audit_get_timestamp(_UNUSED_ void **state)
 {
        const char *t = NULL;
        char *c;
-       struct tm tm;
+       struct tm tm = {};
        time_t before;
        time_t after;
        time_t actual;