diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.108 2013/12/19 00:10:30 djm Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.109 2014/02/02 03:44:31 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -90,7 +90,7 @@ static void | |||
90 | clear_pass(void) | 90 | clear_pass(void) |
91 | { | 91 | { |
92 | if (pass) { | 92 | if (pass) { |
93 | memset(pass, 0, strlen(pass)); | 93 | explicit_bzero(pass, strlen(pass)); |
94 | free(pass); | 94 | free(pass); |
95 | pass = NULL; | 95 | pass = NULL; |
96 | } | 96 | } |
@@ -366,7 +366,7 @@ lock_agent(AuthenticationConnection *ac, int lock) | |||
366 | fprintf(stderr, "Passwords do not match.\n"); | 366 | fprintf(stderr, "Passwords do not match.\n"); |
367 | passok = 0; | 367 | passok = 0; |
368 | } | 368 | } |
369 | memset(p2, 0, strlen(p2)); | 369 | explicit_bzero(p2, strlen(p2)); |
370 | free(p2); | 370 | free(p2); |
371 | } | 371 | } |
372 | if (passok && ssh_lock_agent(ac, lock, p1)) { | 372 | if (passok && ssh_lock_agent(ac, lock, p1)) { |
@@ -374,7 +374,7 @@ lock_agent(AuthenticationConnection *ac, int lock) | |||
374 | ret = 0; | 374 | ret = 0; |
375 | } else | 375 | } else |
376 | fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un"); | 376 | fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un"); |
377 | memset(p1, 0, strlen(p1)); | 377 | explicit_bzero(p1, strlen(p1)); |
378 | free(p1); | 378 | free(p1); |
379 | return (ret); | 379 | return (ret); |
380 | } | 380 | } |