diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -117,7 +117,9 @@ ssh_askpass(char *askpass, char *msg) fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno)); } close(p[1]); - len = atomicio(read, p[0], buf, sizeof buf); + buf[0] = '\0'; + atomicio(read, p[0], buf, sizeof buf); + len = strlen(buf); close(p[0]); while (waitpid(pid, &status, 0) < 0) if (errno != EINTR) |