Fixed length check when excluding XSTAT_ATTR.
[rsync/rsync-patches.git] / fake-super.diff
index cebe34a..1135994 100644 (file)
@@ -464,7 +464,7 @@ above:
                        continue;
  #endif
  
-+              if (am_root < 0 && name_len == XSTAT_LEN
++              if (am_root < 0 && name_len == XSTAT_LEN + 1
 +               && name[CENT_POS] == '%' && strcmp(name, XSTAT_ATTR) == 0)
 +                      continue;
 +
@@ -518,7 +518,7 @@ above:
                                memcpy(name, RSYNC_PREFIX, RPRE_LEN);
                        }
  #endif
-+                      if (am_root < 0 && name_len == XSTAT_LEN
++                      if (am_root < 0 && name_len == XSTAT_LEN + 1
 +                       && name[CENT_POS] == '%' && strcmp(name, XSTAT_ATTR) == 0) {
 +                              free(ptr);
 +                              continue;