diff options
author | Daniel Fandrich <dan@coneharvesters.com> | 2011-11-23 12:07:31 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-23 12:07:31 +0100 |
commit | 65a1ee956f0721ad3cebf79c0a6b3266a0676524 (patch) | |
tree | 4078143c5d2c373f77abe7983722c7cecb16e07a | |
parent | d2277e262ff7dd2dd946ea16b93462f3dcdf0447 (diff) | |
download | busybox-w32-65a1ee956f0721ad3cebf79c0a6b3266a0676524.tar.gz busybox-w32-65a1ee956f0721ad3cebf79c0a6b3266a0676524.tar.bz2 busybox-w32-65a1ee956f0721ad3cebf79c0a6b3266a0676524.zip |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
207 | continue; | 207 | continue; |
208 | error: | 208 | error: |
209 | timeout: | 209 | timeout: |
210 | blockLength = 0; | ||
210 | errors++; | 211 | errors++; |
211 | if (errors == MAXERRORS) { | 212 | if (errors == MAXERRORS) { |
212 | /* Abort */ | 213 | /* Abort */ |