summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2004-04-26 18:21:20 +0000
committeritojun <itojun@openbsd.org>2004-04-26 18:21:20 +0000
commit0cf15a29dba7c352e17e636ca4de9741e81b1eb7 (patch)
tree2fb9b1e9e3f433751afefeea284e3ed7c664fd97
parentchange tcpdrop to require newp instead of oldp; suggested by otto (diff)
downloadwireguard-openbsd-0cf15a29dba7c352e17e636ca4de9741e81b1eb7.tar.xz
wireguard-openbsd-0cf15a29dba7c352e17e636ca4de9741e81b1eb7.zip
bzero hint before use.
-rw-r--r--usr.sbin/spamdb/spamdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/spamdb/spamdb.c b/usr.sbin/spamdb/spamdb.c
index 8f04ee5ee7d..134c9d22fb2 100644
--- a/usr.sbin/spamdb/spamdb.c
+++ b/usr.sbin/spamdb/spamdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamdb.c,v 1.9 2004/04/25 17:32:17 itojun Exp $ */
+/* $OpenBSD: spamdb.c,v 1.10 2004/04/26 18:21:20 itojun Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -47,6 +47,7 @@ dbupdate(char *dbname, char *ip, int add)
db = dbopen(dbname, O_EXLOCK|O_RDWR, 0600, DB_BTREE, &btreeinfo);
if (db == NULL)
err(1, "cannot open %s for writing", dbname);
+ memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
hints.ai_flags = AI_NUMERICHOST;