From 92ad8f320301fc15d304a41b152e7cf6c6547526 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sat, 14 Sep 2019 09:36:40 +0200 Subject: [PATCH] sa_conv.c: Make sure all structures are init'ed before use Signed-off-by: Sebastien GODARD --- sa_conv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sa_conv.c b/sa_conv.c index 462b3b9..d518b81 100644 --- a/sa_conv.c +++ b/sa_conv.c @@ -1458,6 +1458,8 @@ int upgrade_record_header(int fd, int stdfd, struct old_record_header *orec_hdr, { struct record_header rec_hdr; + memset(&rec_hdr, 0, sizeof(struct record_header)); + /* Convert current record header */ rec_hdr.uptime_cs = orec_hdr->uptime0 * 100 / HZ; /* Uptime in cs, not jiffies */ rec_hdr.ust_time = (unsigned long long) orec_hdr->ust_time; -- 2.40.0