From 288e64a79fae9663eb847026d5e2ac252f2020bd Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 26 May 2014 14:04:49 -0700 Subject: Avoid an xattr-finding glitch on the receiver. Fixes bug 9594. --- xattrs.c | 7 ++++--- 1 file 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", -- cgit v1.2.1