mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
libbsnmp: avoid division by zero with empty password
PR: 283909 (cherry picked from commit 4dc1820a16b9b6108e0ff8a0265c08c67fa34146)
This commit is contained in:
parent
5094faf5df
commit
c4cae8cbc3
1 changed files with 1 additions and 1 deletions
|
|
@ -1792,7 +1792,7 @@ snmp_discover_engine(char *passwd)
|
|||
if (snmp_client.user.auth_proto == SNMP_AUTH_NOAUTH)
|
||||
return (0);
|
||||
|
||||
if (passwd == NULL ||
|
||||
if (passwd == NULL || strlen(passwd) == 0 ||
|
||||
snmp_passwd_to_keys(&snmp_client.user, passwd) != SNMP_CODE_OK ||
|
||||
snmp_get_local_keys(&snmp_client.user, snmp_client.engine.engine_id,
|
||||
snmp_client.engine.engine_len) != SNMP_CODE_OK)
|
||||
|
|
|
|||
Loading…
Reference in a new issue