diff options
author | ngie <ngie@FreeBSD.org> | 2017-02-04 17:18:49 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-02-04 17:18:49 +0000 |
commit | 57984c7830ebdc4772eb1d89c9982b4462456c40 (patch) | |
tree | 901eff441e81fab13d65703f9b56ab3e28516ba0 /contrib/bsnmp/snmp_usm | |
parent | 6fc08ca591dde976e62527c2fe2809adb98649d8 (diff) | |
download | FreeBSD-src-57984c7830ebdc4772eb1d89c9982b4462456c40.zip FreeBSD-src-57984c7830ebdc4772eb1d89c9982b4462456c40.tar.gz |
MFC r311394:
op_usm_users: don't deref uusers if it's NULL when SETting the value
Add an XXX comment to note that the conditional seems suspect given
how it's handled elsewhere in the SNMP_OP_SET case.
CID: 1008573
Diffstat (limited to 'contrib/bsnmp/snmp_usm')
-rw-r--r-- | contrib/bsnmp/snmp_usm/usm_snmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/bsnmp/snmp_usm/usm_snmp.c b/contrib/bsnmp/snmp_usm/usm_snmp.c index 6ed639a..a6c7b86 100644 --- a/contrib/bsnmp/snmp_usm/usm_snmp.c +++ b/contrib/bsnmp/snmp_usm/usm_snmp.c @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, struct snmp_value *val, val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* + * XXX (ngie): need to investigate the MIB to determine how + * this is possible given some of the transitions below. + */ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { |