projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5ebe5f
)
rx: Fix file corruption with duplicate blocks
author
Dan Fandrich
<dan@coneharvesters.com>
Thu, 3 Nov 2011 09:18:33 +0000
(10:18 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 3 Nov 2011 09:18:33 +0000
(10:18 +0100)
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>
miscutils/rx.c
patch
|
blob
|
history
diff --git
a/miscutils/rx.c
b/miscutils/rx.c
index e1225779e9c648a345e56e7b1f76c44e64b5064d..972f7ff37c0cf67b8e953efc0130cdf2ba40ca4b 100644
(file)
--- a/
miscutils/rx.c
+++ b/
miscutils/rx.c
@@
-172,6
+172,7
@@
static int receive(/*int read_fd, */int file_fd)
/* a repeat of the last block is ok, just ignore it. */
/* this also ignores the initial block 0 which is */
/* meta data. */
+ blockLength = 0;
goto next;
}
if (blockNo != (wantBlockNo & 0xff)) {