From c055c5334ab324fad656f5c2ac13f4b30138a093 Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 22 Feb 2022 15:59:13 +0000 Subject: [PATCH] requestid is a 32 bit integer, make sure that we request that with ober_scanf_elements. Found the hard way on octeon and patch tested by sebastian rostwald de OK tb --- usr.sbin/snmpd/application.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c index 00659f04246..48ab925ae5f 100644 --- a/usr.sbin/snmpd/application.c +++ b/usr.sbin/snmpd/application.c @@ -1,4 +1,4 @@ -/* $OpenBSD: application.c,v 1.2 2022/01/30 13:27:39 martijn Exp $ */ +/* $OpenBSD: application.c,v 1.3 2022/02/22 15:59:13 martijn Exp $ */ /* * Copyright (c) 2021 Martijn van Duren @@ -610,7 +610,7 @@ appl_processpdu(struct snmp_message *statereference, const char *ctxname, size_t i, varbindlen = 0, repeaterlen; /* pdu must be ASN.1 validated in snmpe.c */ - (void) ober_scanf_elements(pdu, "{iiie", &requestid, &nonrepeaters, + (void) ober_scanf_elements(pdu, "{diie", &requestid, &nonrepeaters, &maxrepetitions, &varbindlist); /* RFC 3413, section 3.2, processPDU, item 5, final bullet */ -- 2.20.1