mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipapwd_pre_mod: NULL ptr deref
In ipapwd_pre_mod, check userpw for NULL before dereferencing its first element. See: https://pagure.io/freeipa/issue/7738 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
800e448aeb
commit
da2078bc60
@ -766,7 +766,7 @@ static int ipapwd_pre_mod(Slapi_PBlock *pb)
|
||||
/* Check this is a clear text password, or refuse operation (only if we need
|
||||
* to comput other hashes */
|
||||
if (! unhashedpw && (gen_krb_keys || is_smb || is_ipant)) {
|
||||
if ('{' == userpw[0]) {
|
||||
if ((userpw != NULL) && ('{' == userpw[0])) {
|
||||
if (0 == strncasecmp(userpw, "{CLEAR}", strlen("{CLEAR}"))) {
|
||||
unhashedpw = slapi_ch_strdup(&userpw[strlen("{CLEAR}")]);
|
||||
if (NULL == unhashedpw) {
|
||||
|
Loading…
Reference in New Issue
Block a user