mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
bsnmpwalk: Fix crash on invalid data
PR: 258570
Reported by: Robert Morris <rtm@lcs.mit.edu>
Reviewed by: emaste, markj
Differential Revision: https://reviews.freebsd.org/D48422
(cherry picked from commit f021e35735)
This commit is contained in:
parent
2e2c4e312e
commit
7fbbab2d32
1 changed files with 1 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx)
|
|||
|
||||
outputs += rc;
|
||||
|
||||
if ((u_int)rc < resp.nbindings) {
|
||||
if ((u_int)rc < resp.nbindings || resp.nbindings == 0) {
|
||||
snmp_pdu_free(&resp);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue