Explorar o código

Bug 750625 - Fix Coverity (11065) Uninitialized pointer read

https://bugzilla.redhat.com/show_bug.cgi?id=750625

plugins/pam_passthru/pam_ptimpl.c (do_one_pam_auth)

Bug Description: Using uninitialized value "pam_id.str" when
calling "delete_my_str_buf".

Fix Description: Initialize pam_id.str with NULL in case bindsdn
is NULL.
Noriko Hosoi %!s(int64=14) %!d(string=hai) anos
pai
achega
f67d3ba0e5
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      ldap/servers/plugins/pam_passthru/pam_ptimpl.c

+ 1 - 0
ldap/servers/plugins/pam_passthru/pam_ptimpl.c

@@ -280,6 +280,7 @@ do_one_pam_auth(
 	if (NULL == bindsdn) {
 		errmsg = PR_smprintf("Null bind dn");
 		retcode = LDAP_OPERATIONS_ERROR;
+		pam_id.str = NULL; /* initialize pam_id.str */
 		goto done; /* skip the pam stuff */
 	}
 	binddn = slapi_sdn_get_dn(bindsdn);