From 141b9912e80a92faa6fd57ba037c062c69707892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 20 Nov 2017 13:58:39 +0100 Subject: [PATCH] Initialize pad field in filecopy final response Do not leak 4 bytes from the receiver stack. Reported by @cfcs --- qrexec-lib/unpack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qrexec-lib/unpack.c b/qrexec-lib/unpack.c index c7513e8..171885a 100644 --- a/qrexec-lib/unpack.c +++ b/qrexec-lib/unpack.c @@ -77,6 +77,7 @@ void send_status_and_crc(int code, const char *last_filename) { saved_errno = errno; hdr.error_code = code; + hdr._pad = 0; hdr.crc32 = crc32_sum; if (!write_all(1, &hdr, sizeof(hdr))) perror("write status");