[Bug 8333] New: crash with hfs-compression.diff and possible fix

samba-bugs at samba.org samba-bugs at samba.org
Thu Jul 28 06:26:03 MDT 2011


           Summary: crash with hfs-compression.diff and possible fix
           Product: rsync
           Version: 3.0.9
          Platform: All
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: martinjotte at gmail.com
         QAContact: rsync-qa at samba.org

Using the latest 3.0.9-pre1 with the hfs-compression patches, rsync crashed on
the receiver side on files with hfs-compression (I used rsync -aHANXxuv
--force-change --hfs-compression --fileflags).

The crash was occurring in routine rsync_xal_set in xattrs.c. Near line 900 of
the patched xattrs.c, we have

                        memcpy(ptr + len, name, name_len);

At this part of the code, for hfs-compressed attributes it appears that ptr is
set to the dummy value UNREAD_DATA (which is defined to be char *1,). This
memcpy should clearly not be performed for hfs-compression, and rsync crashes.

I have temporarily got around this by adding:

                       if (ptr = UNREAD_DATA)

just before the invalid memcpy. This allows rsync to run properly, although I
can't be sure that it is the proper solution.

Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the rsync mailing list