btrfs: Fix improper memmove usage in do_btrfs_subvolume_list (RHBZ#1018149).

The third parameter (number of bytes to copy) was given as an offset
relative to dest, when it should be relative to src.  This fixes some
valgrind warnings I happened across.
This commit is contained in:
John Eckersberg
2013-10-11 22:26:07 -04:00
committed by Richard W.M. Jones
parent 7d0d159bed
commit da85de8a42

View File

@@ -473,7 +473,7 @@ do_btrfs_subvolume_list (const mountable_t *fs)
#undef XSTRTOU64
memmove (line, line + ovector[6], ovector[7] + 1);
memmove (line, line + ovector[6], ovector[7] - ovector[6] + 1);
this->btrfssubvolume_path = line;
}