mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
* ipa_pwd_extop.c (encrypt_encode_key): Handle malloc failure.
This commit is contained in:
parent
d0f0d97be6
commit
3256365277
@ -582,6 +582,11 @@ static Slapi_Value **encrypt_encode_key(krb5_context krbctx, struct ipapwd_data
|
||||
if (krbTicketFlags & KTF_REQUIRES_PRE_AUTH) {
|
||||
salt.length = KRB5P_SALT_SIZE;
|
||||
salt.data = malloc(KRB5P_SALT_SIZE);
|
||||
if (!salt.data) {
|
||||
slapi_log_error(SLAPI_LOG_FATAL, "ipa_pwd_extop",
|
||||
"memory allocation failed\n");
|
||||
goto enc_error;
|
||||
}
|
||||
krberr = krb5_c_random_make_octets(krbctx, &salt);
|
||||
if (krberr) {
|
||||
slapi_log_error(SLAPI_LOG_FATAL, "ipa_pwd_extop",
|
||||
|
Loading…
Reference in New Issue
Block a user