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 /miscutils | |
parent | d2277e262ff7dd2dd946ea16b93462f3dcdf0447 (diff) | |
download | busybox-65a1ee956f0721ad3cebf79c0a6b3266a0676524.tar.gz |
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>
Diffstat (limited to 'miscutils')
-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) continue; error: timeout: + blockLength = 0; errors++; if (errors == MAXERRORS) { /* Abort */ |