1
0
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:
Luka Perkov
2014-03-20 14:46:17 +01:00
committed by Andreas Schneider
parent dbb2de272b
commit a2fe341da5

View File

@@ -508,8 +508,7 @@ void ssh_message_free(ssh_message msg){
case SSH_REQUEST_AUTH:
SAFE_FREE(msg->auth_request.username);
if (msg->auth_request.password) {
memset(msg->auth_request.password, 0,
strlen(msg->auth_request.password));
BURN_STRING(msg->auth_request.password);
SAFE_FREE(msg->auth_request.password);
}
ssh_key_free(msg->auth_request.pubkey);