X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3be97bf931a73f43e68ad1b919510fca9bdd9134..051ad69634a961188a09453b33abe605c2a55bd6:/io.c diff --git a/io.c b/io.c index 7bf0afc6..0968b016 100644 --- a/io.c +++ b/io.c @@ -288,13 +288,17 @@ static void read_msg_fd(void) switch (tag) { case MSG_DONE: - if (len != 0 || !am_generator) { + if (len < 0 || len > 1 || !am_generator) { invalid_msg: rprintf(FERROR, "invalid message %d:%d [%s%s]\n", tag, len, who_am_i(), incremental ? "/incremental" : ""); exit_cleanup(RERR_STREAMIO); } + if (len) { + readfd(fd, buf, len); + stats.total_read = read_longint(fd); + } done_cnt++; break; case MSG_REDO: