mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Potential NULL dereference in ipapwd_prepost
This patch increases robustness in PRE MOD password SLAPI module by ensuring that an uninitialized pointer is not dereferenced. https://fedorahosted.org/freeipa/ticket/719
This commit is contained in:
parent
d03ffeabe2
commit
bea3999daf
@ -564,8 +564,8 @@ static int ipapwd_pre_mod(Slapi_PBlock *pb)
|
||||
if (!bv) {
|
||||
is_pwd_op = 0;
|
||||
} else {
|
||||
if (0 == strncmp(userpw, bv->bv_val, bv->bv_len) ||
|
||||
0 == strncmp(unhashedpw, bv->bv_val, bv->bv_len))
|
||||
if ((userpw && 0 == strncmp(userpw, bv->bv_val, bv->bv_len)) ||
|
||||
(unhashedpw && 0 == strncmp(unhashedpw, bv->bv_val, bv->bv_len)))
|
||||
is_pwd_op = 0;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user