diff options
author | 2010-10-15 11:56:13 +0000 | |
---|---|---|
committer | 2010-10-15 11:56:13 +0000 | |
commit | abf52ae23be06f1009d5c3997d9ba0a53455da4a (patch) | |
tree | 254d298e96b9c500b82a7cd86a3794a8c1a396b8 | |
parent | libdes -> libcrypto (diff) | |
download | wireguard-openbsd-abf52ae23be06f1009d5c3997d9ba0a53455da4a.tar.xz wireguard-openbsd-abf52ae23be06f1009d5c3997d9ba0a53455da4a.zip |
return numeric 0 rather than attempting to return a null string,
fixes a segfault when walking memiftable.
seems sane to phessler, ok dlg@
-rw-r--r-- | usr.sbin/snmpd/mib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index 9f0b743b8ca..b7886bb548a 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.42 2010/09/23 10:49:55 dlg Exp $ */ +/* $OpenBSD: mib.c,v 1.43 2010/10/15 11:56:13 sthen Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -1428,7 +1428,8 @@ mib_memiftable(struct oid *oid, struct ber_oid *o, struct ber_element **elm) ber = ber_add_string(ber, kif->if_name); break; case 2: - ber = ber_add_string(ber, 0); + ber = ber_add_integer(ber, 0); + ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER64); break; default: return (-1); |