mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09: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>
(cherry picked from commit a2fe341da5)
This commit is contained in:
committed by
Andreas Schneider
parent
da0c77fdb1
commit
3fed9a5aff
@@ -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