From 7dae429fbd052242c19ae4cd973d9c766c0e9f30 Mon Sep 17 00:00:00 2001 From: dholland Date: Tue, 31 May 2016 03:47:49 +0000 Subject: [PATCH] PR 51003 David Binderman: bzero struct before passing it around. This is actually unnecessary as the call in question uses only fields that have been set explicitly, but good practice regardless and it's not like it's on a performance-critical path. --- lib/libc/time/zic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c index 95d53f1d74bc..7b8e9873c5eb 100644 --- a/lib/libc/time/zic.c +++ b/lib/libc/time/zic.c @@ -1,4 +1,4 @@ -/* $NetBSD: zic.c,v 1.57 2016/03/15 15:16:01 christos Exp $ */ +/* $NetBSD: zic.c,v 1.58 2016/05/31 03:47:49 dholland Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2006-07-17 by Arthur David Olson. @@ -10,7 +10,7 @@ #include #ifndef lint -__RCSID("$NetBSD: zic.c,v 1.57 2016/03/15 15:16:01 christos Exp $"); +__RCSID("$NetBSD: zic.c,v 1.58 2016/05/31 03:47:49 dholland Exp $"); #endif /* !defined lint */ #include "private.h" @@ -2551,6 +2551,7 @@ error(_("can't determine time zone abbreviation to use just after until time")); */ struct rule xr; struct attype *lastat; + memset(&xr, 0, sizeof(xr)); xr.r_month = TM_JANUARY; xr.r_dycode = DC_DOM; xr.r_dayofmonth = 1;