PR/34030: Takehiko NOZAKI: double-free bugs in CVS 1.11.22
Don't free/trash the password if we did not allocate it using scramble().
This commit is contained in:
parent
2bc28e91d7
commit
4bfcc501c1
|
@ -3936,8 +3936,11 @@ auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi)
|
|||
send_to_server("\012", 1);
|
||||
|
||||
/* Paranoia. */
|
||||
memset (password, 0, strlen (password));
|
||||
free (password);
|
||||
if (no_passwd)
|
||||
{
|
||||
memset (password, 0, strlen (password));
|
||||
free (password);
|
||||
}
|
||||
# else /* ! AUTH_CLIENT_SUPPORT */
|
||||
error (1, 0, "INTERNAL ERROR: This client does not support pserver authentication");
|
||||
# endif /* AUTH_CLIENT_SUPPORT */
|
||||
|
|
Loading…
Reference in New Issue