mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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:
committed by
Richard W.M. Jones
parent
7d0d159bed
commit
da85de8a42
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user