ostree/parse-datetime: Ensure tm structs are initialised
Otherwise tm.tm_wday remains uninitialised and gets propagated elsewhere. Spotted by Coverity as issue #209265. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1059 Approved by: cgwalters
This commit is contained in:
parent
e9b9123bae
commit
86dce4b252
|
|
@ -1280,8 +1280,8 @@ parse_datetime (struct timespec *result, char const *p,
|
|||
time_t Start;
|
||||
long int Start_ns;
|
||||
struct tm const *tmp;
|
||||
struct tm tm;
|
||||
struct tm tm0;
|
||||
struct tm tm = { 0, };
|
||||
struct tm tm0 = { 0, };
|
||||
parser_control pc;
|
||||
struct timespec gettime_buffer;
|
||||
unsigned char c;
|
||||
|
|
|
|||
Loading…
Reference in New Issue