[Bug 8665] Crash in free_xattr(), from recv_generator()

samba-bugs at samba.org samba-bugs at samba.org
Fri Dec 16 10:15:20 MST 2011


https://bugzilla.samba.org/show_bug.cgi?id=8665

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-12-16 17:15:19 UTC ---
Thanks for all that very informative detail!

I believe that the fix is to change the assignment to:

init_stat_x(&real_sx);
real_sx.st = sx.st;

And thus, avoid the duplicating of allocated data.  I made that change in both
places where the real_sx = sx assignment was done.  In the first case, it
shouldn't change any thing because there shouldn't be any already allocated
xattr/acl data on the directory-updating code path (so it was just done for
consistency).  In the second case, the real_sx copy is only used for one
itemize call, so it should be fine that the call allocates its own data (and
seems to be what is expected, since it immediately frees it).

Let me know if you notice any more issues.

-- 
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