samba-bugs at samba.org
2011-Jul-28 12:26 UTC
[Bug 8333] New: crash with hfs-compression.diff and possible fix
https://bugzilla.samba.org/show_bug.cgi?id=8333 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) continue; 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.
samba-bugs at samba.org
2011-Aug-01 05:57 UTC
[Bug 8333] crash with hfs-compression.diff and possible fix
https://bugzilla.samba.org/show_bug.cgi?id=8333 Wayne Davison <wayned at samba.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Wayne Davison <wayned at samba.org> 2011-08-01 05:57:36 UTC --- Thanks. I've checked in a change that will fix the crash, and avoid any of the free() calls that might have been called on the UNREAD_DATA value. I did not try to figure out the logic to know if the code needs to do something else other than skip that xattr. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Reasonably Related Threads
- [Bug 8284] New: hfs-compression.diff patch incorrectly expands relative directory
- [Bug 8267] New: hfs-compression.diff compile fix
- Fwd: Making rsync compile under Mac OS X 10.3.9 with extended attributes
- [PATCH] xattrs not set on locked files that already exist on target
- Make HFS work with Wine