Initialize pad field in filecopy final response

Do not leak 4 bytes from the receiver stack.

Reported by @cfcs
pull/27/head mm_141b9912
Marek Marczykowski-Górecki 7 years ago
parent 75fa0d3cb0
commit 141b9912e8
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -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");

Loading…
Cancel
Save