summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-add.c b/ssh-add.c
index efbf771d3..3adc2509f 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -117,7 +117,9 @@ ssh_askpass(char *askpass, char *msg)
117 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno)); 117 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno));
118 } 118 }
119 close(p[1]); 119 close(p[1]);
120 len = atomicio(read, p[0], buf, sizeof buf); 120 buf[0] = '\0';
121 atomicio(read, p[0], buf, sizeof buf);
122 len = strlen(buf);
121 close(p[0]); 123 close(p[0]);
122 while (waitpid(pid, &status, 0) < 0) 124 while (waitpid(pid, &status, 0) < 0)
123 if (errno != EINTR) 125 if (errno != EINTR)