diff options
author | Ilya Etingof <etingof@gmail.com> | 2018-04-21 23:16:17 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2018-04-21 23:16:17 +0200 |
commit | 8da24e3fdbc9404255b1b1dc3dd389b4ea994ac0 (patch) | |
tree | 9e0e5e1e890003089f2e899f6008b28913aec019 | |
parent | 4938e8e383d207fa83cdbfd17186acaef97e6de4 (diff) | |
download | pysnmp-git-8da24e3fdbc9404255b1b1dc3dd389b4ea994ac0.tar.gz |
fix potential infinite loop in GETBULK response builder
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | pysnmp/entity/rfc3413/cmdrsp.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 0f96ddf1..57252f44 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ Revision 4.4.5, released 2018-04-XX - Fixed broken InetAddressType rendering caused by a pyasn1 regression - Fixed typo in RFC1158 module +- Fixed possible infinite loop in GETBULK response PDU builder Revision 4.4.4, released 2018-01-03 ----------------------------------- diff --git a/pysnmp/entity/rfc3413/cmdrsp.py b/pysnmp/entity/rfc3413/cmdrsp.py index b260918b..f69e2646 100644 --- a/pysnmp/entity/rfc3413/cmdrsp.py +++ b/pysnmp/entity/rfc3413/cmdrsp.py @@ -292,7 +292,7 @@ class BulkCommandResponder(CommandResponderBase): R = max(len(reqVarBinds) - N, 0) if R: - M = min(M, self.maxVarBinds / R) + M = min(M, self.maxVarBinds // R) debug.logger & debug.flagApp and debug.logger('handleMgmtOperation: N %d, M %d, R %d' % (N, M, R)) |