mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Fix memory leak of pass in converse().
This commit is contained in:
parent
0044893961
commit
f5cae905ca
@ -723,7 +723,8 @@ converse(int num_msg, PAM_CONST struct pam_message **msg,
|
||||
if (strlen(pass) >= PAM_MAX_RESP_SIZE) {
|
||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||
"password longer than %d", PAM_MAX_RESP_SIZE);
|
||||
explicit_bzero(pass, strlen(pass));
|
||||
freezero(pass, strlen(pass));
|
||||
pass = NULL;
|
||||
goto bad;
|
||||
}
|
||||
reply[n].resp = pass; /* auth_getpass() malloc's a copy */
|
||||
|
Loading…
x
Reference in New Issue
Block a user