Skip to content

Commit

Permalink
Avoid an xattr-finding glitch on the receiver.
Browse files Browse the repository at this point in the history
Fixes bug 9594.
  • Loading branch information
Wayne Davison committed May 26, 2014
1 parent 0872dff commit 288e64a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xattrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 288e64a

Please sign in to comment.