diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-11-03 10:18:33 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-03 10:18:33 +0100 |
commit | f808e777db05bed7b3c0a4aa5f12121fb3d0ca5f (patch) | |
tree | d10f8cd070cb1b748990734de7dff342f5dad64d | |
parent | b5ebe5fdb3a520114fc4f956687e2c51f3b81429 (diff) | |
download | busybox-w32-f808e777db05bed7b3c0a4aa5f12121fb3d0ca5f.tar.gz busybox-w32-f808e777db05bed7b3c0a4aa5f12121fb3d0ca5f.tar.bz2 busybox-w32-f808e777db05bed7b3c0a4aa5f12121fb3d0ca5f.zip |
rx: Fix file corruption with duplicate blocks
Rather than dropping the dupe, rx was appending it to the file.
Signed-off-by: Dan 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 e1225779e..972f7ff37 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -172,6 +172,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
172 | /* a repeat of the last block is ok, just ignore it. */ | 172 | /* a repeat of the last block is ok, just ignore it. */ |
173 | /* this also ignores the initial block 0 which is */ | 173 | /* this also ignores the initial block 0 which is */ |
174 | /* meta data. */ | 174 | /* meta data. */ |
175 | blockLength = 0; | ||
175 | goto next; | 176 | goto next; |
176 | } | 177 | } |
177 | if (blockNo != (wantBlockNo & 0xff)) { | 178 | if (blockNo != (wantBlockNo & 0xff)) { |