From 0e9c1d02bdcabe1827818d077b497e8dc1cbd8e5 Mon Sep 17 00:00:00 2001 From: Martijn van Duren Date: Tue, 30 Aug 2022 14:54:19 +0000 Subject: copy over av_oid_end.bo_n instead of av_oid.bo_n bytes when copying over the searchrange end oid. OK tb@ --- usr.sbin/snmpd/application_agentx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/snmpd/application_agentx.c b/usr.sbin/snmpd/application_agentx.c index c04f2dd0b1c..3b773842cfe 100644 --- a/usr.sbin/snmpd/application_agentx.c +++ b/usr.sbin/snmpd/application_agentx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: application_agentx.c,v 1.2 2022/08/29 18:10:48 martijn Exp $ */ +/* $OpenBSD: application_agentx.c,v 1.3 2022/08/30 14:54:18 martijn Exp $ */ /* * Copyright (c) 2022 Martijn van Duren * @@ -660,7 +660,7 @@ appl_agentx_getnext(struct appl_backend *backend, int32_t transactionid, srl[i].asr_start.aoi_id[j] = vb->av_oid.bo_id[j]; srl[i].asr_stop.aoi_include = 0; srl[i].asr_stop.aoi_idlen = vb->av_oid_end.bo_n; - for (j = 0; j < vb->av_oid.bo_n; j++) + for (j = 0; j < vb->av_oid_end.bo_n; j++) srl[i].asr_stop.aoi_id[j] = vb->av_oid_end.bo_id[j]; } if ((context = appl_agentx_string2ostring(ctx, &string)) == NULL) { -- cgit v1.2.3