From: Daniel Fandrich Date: Wed, 23 Nov 2011 11:07:31 +0000 (+0100) Subject: rx: fix file corruption on block checksum failure X-Git-Tag: 1_20_0~140 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=65a1ee956f0721ad3cebf79c0a6b3266a0676524;p=oweals%2Fbusybox.git rx: fix file corruption on block checksum failure Rather than dropping the bad block, rx was appending it to the file. Signed-off-by: Daniel Fandrich Signed-off-by: Denys Vlasenko --- diff --git a/miscutils/rx.c b/miscutils/rx.c index c48a61fd0..af597320c 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c @@ -207,6 +207,7 @@ static int receive(/*int read_fd, */int file_fd) continue; error: timeout: + blockLength = 0; errors++; if (errors == MAXERRORS) { /* Abort */