From a2fe341da558d27c348d55b1fbf9824f42ff2432 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Thu, 20 Mar 2014 14:46:17 +0100 Subject: [PATCH] messages: use predefined macro for clearing sensitive data Signed-off-by: Luka Perkov Reviewed-by: Andreas Schneider --- src/messages.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/messages.c b/src/messages.c index 4246c637..e7bf39f0 100644 --- a/src/messages.c +++ b/src/messages.c @@ -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);