diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:32:39 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:34:16 +0000 |
commit | 2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch) | |
tree | 86848a7668424b392d48791a0e41e05f9df7b62b /readpass.c | |
parent | c9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff) | |
parent | 9cbb60f5e4932634db04c330c88abc49cc5567bd (diff) |
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'readpass.c')
-rw-r--r-- | readpass.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/readpass.c b/readpass.c index e37d31158..869d86425 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.c,v 1.49 2013/05/17 00:13:14 djm Exp $ */ | 1 | /* $OpenBSD: readpass.c,v 1.50 2014/02/02 03:44:31 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -99,13 +99,13 @@ ssh_askpass(char *askpass, const char *msg) | |||
99 | break; | 99 | break; |
100 | signal(SIGCHLD, osigchld); | 100 | signal(SIGCHLD, osigchld); |
101 | if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) { | 101 | if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) { |
102 | memset(buf, 0, sizeof(buf)); | 102 | explicit_bzero(buf, sizeof(buf)); |
103 | return NULL; | 103 | return NULL; |
104 | } | 104 | } |
105 | 105 | ||
106 | buf[strcspn(buf, "\r\n")] = '\0'; | 106 | buf[strcspn(buf, "\r\n")] = '\0'; |
107 | pass = xstrdup(buf); | 107 | pass = xstrdup(buf); |
108 | memset(buf, 0, sizeof(buf)); | 108 | explicit_bzero(buf, sizeof(buf)); |
109 | return pass; | 109 | return pass; |
110 | } | 110 | } |
111 | 111 | ||
@@ -162,7 +162,7 @@ read_passphrase(const char *prompt, int flags) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | ret = xstrdup(buf); | 164 | ret = xstrdup(buf); |
165 | memset(buf, 'x', sizeof buf); | 165 | explicit_bzero(buf, sizeof(buf)); |
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
168 | 168 | ||