summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorGerhard Roth <gerhard@cvs.openbsd.org>2019-05-02 14:04:11 +0000
committerGerhard Roth <gerhard@cvs.openbsd.org>2019-05-02 14:04:11 +0000
commite966698458c9834b9a162dc6f740a8ef5b089704 (patch)
tree083c3ee4b223a8be4c27420da4a41bb725a79e0f /usr.sbin/snmpd
parent73ebeade61d7888cee9218f96e4a1d4614cfbb47 (diff)
Index 0 is out of range for hrStorageIndex.
ok reyk@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/mib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index f30b6ed1726..fb0ae33aff1 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.92 2018/12/10 13:35:54 landry Exp $ */
+/* $OpenBSD: mib.c,v 1.93 2019/05/02 14:04:10 gerhard Exp $ */
/*
* Copyright (c) 2012 Joel Knight <joel@openbsd.org>
@@ -614,6 +614,8 @@ mib_hrstorage(struct oid *oid, struct ber_oid *o, struct ber_element **elm)
sop = &so[0];
switch (idx) {
+ case 0:
+ return (-1);
case 1:
descr = "Physical memory";
units = uvm.pagesize;