diff options
author | Wayne Davison <wayned@samba.org> | 2014-05-26 14:04:49 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-05-26 14:08:31 -0700 |
commit | 288e64a79fae9663eb847026d5e2ac252f2020bd (patch) | |
tree | 5d1b80facbd250680c338696f5c93a353a9d14bd /xattrs.c | |
parent | 0872dff60c34c9210daf33fa10cb69a8a934562c (diff) | |
download | android_external_rsync-288e64a79fae9663eb847026d5e2ac252f2020bd.tar.gz android_external_rsync-288e64a79fae9663eb847026d5e2ac252f2020bd.tar.bz2 android_external_rsync-288e64a79fae9663eb847026d5e2ac252f2020bd.zip |
Avoid an xattr-finding glitch on the receiver.
Fixes bug 9594.
Diffstat (limited to 'xattrs.c')
-rw-r--r-- | xattrs.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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", |