[PATCH v2] Btrfs: send, fix corrupted path strings for long paths

2014-05-21 Thread Filipe David Borba Manana
If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call. Test: mkfs.btrfs -f /dev/sdd mount /dev/sdd /mnt

Re: [PATCH v2] Btrfs: send, fix corrupted path strings for long paths

2014-05-21 Thread Marc MERLIN
On Wed, May 21, 2014 at 05:38:13PM +0100, Filipe David Borba Manana wrote: If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call.