summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2014-05-26 14:04:49 -0700
committerWayne Davison <wayned@samba.org>2014-05-26 14:08:31 -0700
commit288e64a79fae9663eb847026d5e2ac252f2020bd (patch)
tree5d1b80facbd250680c338696f5c93a353a9d14bd
parent0872dff60c34c9210daf33fa10cb69a8a934562c (diff)
downloadrsync-288e64a79fae9663eb847026d5e2ac252f2020bd.tar.gz
Avoid an xattr-finding glitch on the receiver.
Fixes bug 9594.
-rw-r--r--xattrs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xattrs.c b/xattrs.c
index 01160a69..57d40e17 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -611,9 +611,10 @@ int recv_xattr_request(struct file_struct *file, int f_in)
num = 0;
while ((rel_pos = read_varint(f_in)) != 0) {
num += rel_pos;
- while (cnt && rxa->num < num) {
- rxa++;
- cnt--;
+ /* Note that the sender-related num values may not be in order on the receiver! */
+ while (cnt && (am_sender ? rxa->num < num : rxa->num != num)) {
+ rxa++;
+ cnt--;
}
if (!cnt || rxa->num != num) {
rprintf(FERROR, "[%s] could not find xattr #%d for %s\n",