From 752950f94631860a6569433e30636aa0933966e1 Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 24 Oct 2023 14:11:14 +0000 Subject: [PATCH] set ab_range explicitly to 1 for appl_agentx_session instead of relying on malloc random garbage. OK tb@ --- usr.sbin/snmpd/application_agentx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/snmpd/application_agentx.c b/usr.sbin/snmpd/application_agentx.c index 594ef09f3d9..2d13f04e8a0 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.11 2023/10/24 14:02:52 martijn Exp $ */ +/* $OpenBSD: application_agentx.c,v 1.12 2023/10/24 14:11:14 martijn Exp $ */ /* * Copyright (c) 2022 Martijn van Duren * @@ -548,6 +548,7 @@ appl_agentx_open(struct appl_agentx_connection *conn, struct ax_pdu *pdu) session->sess_backend.ab_cookie = session; session->sess_backend.ab_retries = 0; session->sess_backend.ab_fn = &appl_agentx_functions; + session->sess_backend.ab_range = 1; RB_INIT(&(session->sess_backend.ab_requests)); TAILQ_INSERT_TAIL(&(conn->conn_sessions), session, sess_conn_entry); -- 2.20.1