From 82ac3e17e37a05343b36630d0d45ea10487bae77 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 3 Jan 2003 22:54:30 +0000 Subject: zero sockaddr before use --- sbin/pfctl/pfctl_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c index 6d6c268b9a0..8ca004729d0 100644 --- a/sbin/pfctl/pfctl_table.c +++ b/sbin/pfctl/pfctl_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_table.c,v 1.6 2003/01/03 22:50:14 deraadt Exp $ */ +/* $OpenBSD: pfctl_table.c,v 1.7 2003/01/03 22:54:29 deraadt Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -552,6 +552,7 @@ print_addrx(struct pfr_addr *ad, struct pfr_addr *rad, int dns) union sockaddr_union sa; int rv; + bzero(&sa, sizeof sa); sa.sa.sa_len = (ad->pfra_af == AF_INET) ? sizeof(sa.sin) : sizeof(sa.sin6); sa.sa.sa_family = ad->pfra_af; -- cgit v1.2.3