From 71d708cf1d9d9f73e98de3818db718c5be3dc8eb Mon Sep 17 00:00:00 2001 From: Sharon Krendel Date: Wed, 17 Jun 2020 15:05:19 +0300 Subject: [PATCH] Fix possible infinite loop in responder_lite When querying with asyncio pysnmp with uneven number of oids an infinite loop occurres --- snmpsim/commands/responder_lite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snmpsim/commands/responder_lite.py b/snmpsim/commands/responder_lite.py index bfa3fe9..6eab5a5 100644 --- a/snmpsim/commands/responder_lite.py +++ b/snmpsim/commands/responder_lite.py @@ -299,7 +299,7 @@ def get_bulk_handler( R = max(len(req_var_binds) - N, 0) if R: - M = min(M, args.max_var_binds / R) + M = min(M, int(args.max_var_binds / R)) if N: rsp_var_binds = read_next_vars(req_var_binds[:N])