mirror of
https://github.com/sheumann/hush.git
synced 2025-01-11 08:29:54 +00:00
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>
This commit is contained in:
parent
b5ebe5fdb3
commit
f808e777db
@ -172,6 +172,7 @@ static int receive(/*int read_fd, */int file_fd)
|
|||||||
/* a repeat of the last block is ok, just ignore it. */
|
/* a repeat of the last block is ok, just ignore it. */
|
||||||
/* this also ignores the initial block 0 which is */
|
/* this also ignores the initial block 0 which is */
|
||||||
/* meta data. */
|
/* meta data. */
|
||||||
|
blockLength = 0;
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
if (blockNo != (wantBlockNo & 0xff)) {
|
if (blockNo != (wantBlockNo & 0xff)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user