From fd375ddbd86e7302335cc70f2fd7fa81c2914824 Mon Sep 17 00:00:00 2001 From: martijn Date: Mon, 29 Aug 2022 12:17:24 +0000 Subject: [PATCH] Fix a case where EndOfMibView wasn't honoured. OK tb@ --- lib/libagentx/agentx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libagentx/agentx.c b/lib/libagentx/agentx.c index 65fa5cc84a4..61fe9ccbce8 100644 --- a/lib/libagentx/agentx.c +++ b/lib/libagentx/agentx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agentx.c,v 1.15 2022/07/19 19:25:42 martijn Exp $ */ +/* $OpenBSD: agentx.c,v 1.16 2022/08/29 12:17:24 martijn Exp $ */ /* * Copyright (c) 2019 Martijn van Duren * @@ -2722,7 +2722,8 @@ agentx_varbind_start(struct agentx_varbind *axv) getnext: while (axo != NULL && axo->axo_cstate != AX_CSTATE_OPEN) axo = RB_NEXT(axc_objects, &(axc->axc_objects), axo); - if (axo == NULL) { + if (axo == NULL || + ax_oid_cmp(&(axo->axo_oid), &(axv->axv_end)) > 0) { agentx_varbind_endofmibview(axv); return; } -- 2.20.1