Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
580cffd
)
Include backup in map_ptr() to avoid backing up when reading.
author
Wayne Davison
<wayned@samba.org>
Sat, 15 Jan 2011 19:16:49 +0000
(11:16 -0800)
committer
Wayne Davison
<wayned@samba.org>
Sat, 15 Jan 2011 19:16:49 +0000
(11:16 -0800)
match.c
patch
|
blob
|
blame
|
history
diff --git
a/match.c
b/match.c
index
cbb6fe2
..
f8a1a8f
100644
(file)
--- a/
match.c
+++ b/
match.c
@@
-257,7
+257,11
@@
static void hash_search(int f,struct sum_struct *s,
* in the sender's file, we'll output enough literal data
* to re-align with the basis file, and get back to seeking
* instead of writing. */
- map = (schar *)map_ptr(buf, aligned_offset, l);
+ backup = (int32)(aligned_offset - last_match);
+ if (backup < 0)
+ backup = 0;
+ map = (schar *)map_ptr(buf, aligned_offset - backup, l + backup)
+ + backup;
sum = get_checksum1((char *)map, l);
if (sum != s->sums[i2].sum1)
break;