mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
ipa-pwd-extop: Fix segfault in password change.
Do not pass an empty buffer to ber_init() as it will assert. Check before hand and return an error.
This commit is contained in:
parent
ffd760c100
commit
37836a2e6c
@ -162,6 +162,13 @@ static int ipapwd_chpwop(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
|
||||
/* Get the ber value of the extended operation */
|
||||
slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_VALUE, &extop_value);
|
||||
|
||||
if (extop_value == NULL ||
|
||||
(extop_value->bv_len == 0 || extop_value->bv_val == NULL)) {
|
||||
errMesg = "PasswdModify Request empty.\n";
|
||||
rc = LDAP_UNWILLING_TO_PERFORM;
|
||||
goto free_and_return;
|
||||
}
|
||||
|
||||
if ((ber = ber_init(extop_value)) == NULL)
|
||||
{
|
||||
errMesg = "PasswdModify Request decode failed.\n";
|
||||
|
Loading…
Reference in New Issue
Block a user