From b9e0e93a9072a360c4d7f905c3c0f8804f6d3953 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Fri, 11 Mar 2011 13:16:33 +0100 Subject: [PATCH] In qrexec_client, check write_all(local_stdin_fd,..) value --- qrexec/qrexec_client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qrexec/qrexec_client.c b/qrexec/qrexec_client.c index 38271cf8..db4ba607 100644 --- a/qrexec/qrexec_client.c +++ b/qrexec/qrexec_client.c @@ -125,8 +125,10 @@ void handle_daemon_data(int s) case MSG_SERVER_TO_CLIENT_STDOUT: if (hdr.len == 0) close(local_stdin_fd); - else - write_all(local_stdin_fd, buf, hdr.len); + else if (!write_all(local_stdin_fd, buf, hdr.len)) { + perror("write local stdout"); + exit(1); + } break; case MSG_SERVER_TO_CLIENT_STDERR: write_all(2, buf, hdr.len);