mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
messages: use predefined macro for clearing sensitive data
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
dbb2de272b
commit
a2fe341da5
@@ -508,8 +508,7 @@ void ssh_message_free(ssh_message msg){
|
|||||||
case SSH_REQUEST_AUTH:
|
case SSH_REQUEST_AUTH:
|
||||||
SAFE_FREE(msg->auth_request.username);
|
SAFE_FREE(msg->auth_request.username);
|
||||||
if (msg->auth_request.password) {
|
if (msg->auth_request.password) {
|
||||||
memset(msg->auth_request.password, 0,
|
BURN_STRING(msg->auth_request.password);
|
||||||
strlen(msg->auth_request.password));
|
|
||||||
SAFE_FREE(msg->auth_request.password);
|
SAFE_FREE(msg->auth_request.password);
|
||||||
}
|
}
|
||||||
ssh_key_free(msg->auth_request.pubkey);
|
ssh_key_free(msg->auth_request.pubkey);
|
||||||
|
|||||||
Reference in New Issue
Block a user