projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9b9123
)
ostree/parse-datetime: Ensure tm structs are initialised
author
Philip Withnall
<withnall@endlessm.com>
Mon, 7 Aug 2017 13:13:30 +0000
(14:13 +0100)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Tue, 8 Aug 2017 14:11:07 +0000
(14:11 +0000)
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
src/ostree/parse-datetime.y
patch
|
blob
|
history
diff --git
a/src/ostree/parse-datetime.y
b/src/ostree/parse-datetime.y
index f5688d30b511bb86c48609854f4bef1947fb1950..5091735457442e66348db74f341345a6b936e0fa 100644
(file)
--- a/
src/ostree/parse-datetime.y
+++ b/
src/ostree/parse-datetime.y
@@
-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;