ssh-upload: prevent buffer overrun
[gitweb.git] / peek-remote.c
index 87f1543fec05e88fd1bc554740993397f0aa3807..353da002b4c7632ed66c1b3ceacaa985ec137627 100644 (file)
@@ -66,6 +66,6 @@ int main(int argc, char **argv)
        ret = peek_remote(fd, flags);
        close(fd[0]);
        close(fd[1]);
-       finish_connect(pid);
-       return ret;
+       ret |= finish_connect(pid);
+       return !!ret;
 }