summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Fandrich <dan@coneharvesters.com>2011-11-23 11:07:31 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-11-23 11:07:31 (GMT)
commit65a1ee956f0721ad3cebf79c0a6b3266a0676524 (patch)
tree4078143c5d2c373f77abe7983722c7cecb16e07a
parentd2277e262ff7dd2dd946ea16b93462f3dcdf0447 (diff)
downloadbusybox-65a1ee956f0721ad3cebf79c0a6b3266a0676524.tar.gz
busybox-65a1ee956f0721ad3cebf79c0a6b3266a0676524.tar.bz2
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 <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/rx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/miscutils/rx.c b/miscutils/rx.c
index c48a61f..af59732 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 */