Fixed the setting of extra_len in receive_xattr().
authorWayne Davison <wayned@samba.org>
Tue, 7 Nov 2006 04:35:23 +0000 (04:35 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 7 Nov 2006 04:35:23 +0000 (04:35 +0000)
xattrs.diff

index 9334471..ceaacc5 100644 (file)
@@ -628,7 +628,7 @@ TODO:
  transfer.  The resulting value is treated as though it was the permissions
 --- old/xattr.c
 +++ new/xattr.c
-@@ -0,0 +1,415 @@
+@@ -0,0 +1,417 @@
 +/*
 + * Extended Attribute support for rsync.
 + * Written by Jay Fenlason, vaguely based on the ACLs patch.
@@ -929,8 +929,10 @@ TODO:
 +                      rsync_xa *rxa;
 +                      size_t name_len = read_int(f);
 +                      size_t datum_len = read_int(f);
-+                      size_t extra_len = am_root < 0 ? RPRE_LEN : 0;
-+#ifndef HAVE_LINUX_XATTRS
++#ifdef HAVE_LINUX_XATTRS
++                      size_t extra_len = 0;
++#else
++                      size_t extra_len = am_root ? RPRE_LEN : 0;
 +                      if (datum_len + extra_len < datum_len)
 +                              out_of_memory("receive_xattr"); /* overflow */
 +#endif