From 2315c0b3bbe9ed328e098701209a16376ddaf799 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 23 Feb 2022 20:17:58 -0700 Subject: [PATCH] iolog_rewrite: initialize struct timing_closure before using. Coverity CID 249971 --- logsrvd/iolog_writer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logsrvd/iolog_writer.c b/logsrvd/iolog_writer.c index bcbfe609d..fa8fe5433 100644 --- a/logsrvd/iolog_writer.c +++ b/logsrvd/iolog_writer.c @@ -763,6 +763,9 @@ iolog_rewrite(const struct timespec *target, struct connection_closure *closure) bool ret = false; debug_decl(iolog_rewrite, SUDO_DEBUG_UTIL); + memset(&timing, 0, sizeof(timing)); + timing.decimal = "."; + /* Parse timing file until we reach the target point. */ /* TODO: use iolog_seekto with a callback? */ for (;;) {