summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/smi.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-01-04 12:57:41 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-01-04 12:57:41 +0000
commitd50a6468d6efb4a21cd1fed938134eece63d03d3 (patch)
tree4d7fa19f523d5aafdf76f0b4343fe87510866811 /usr.sbin/snmpd/smi.c
parent41968d33a5b4c1c616b4e3d7c064fac67ad2ea1e (diff)
always bzero the oid lookup key before initializing it.
Diffstat (limited to 'usr.sbin/snmpd/smi.c')
-rw-r--r--usr.sbin/snmpd/smi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/smi.c b/usr.sbin/snmpd/smi.c
index 28fc6f9cb75..b35ff3254e0 100644
--- a/usr.sbin/snmpd/smi.c
+++ b/usr.sbin/snmpd/smi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smi.c,v 1.3 2008/01/02 20:54:59 maja Exp $ */
+/* $OpenBSD: smi.c,v 1.4 2008/01/04 12:57:40 reyk Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net>
@@ -85,6 +85,7 @@ smi_oidstring(struct ber_oid *o, char *buf, size_t len)
size_t i, lookup = 1;
bzero(buf, len);
+ bzero(&key, sizeof(key));
bcopy(o, &key.o_id, sizeof(struct ber_oid));
key.o_flags |= OID_KEY; /* do not match wildcards */