btrfs-progs: sanitize - Use correct source for memcpy

While performing a memcpy, we are copying from uninitialized dst
as opposed to src->data. Though using eb->len is correct, I used
src->len to make it more readable.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Goldwyn Rodrigues 2017-01-20 13:03:33 -06:00 committed by David Sterba
parent b73d67f20a
commit 1c5301a4b6
1 changed files with 1 additions and 1 deletions

View File

@ -550,7 +550,7 @@ static void sanitize_name(struct metadump_struct *md, u8 *dst,
return;
}
memcpy(eb->data, dst, eb->len);
memcpy(eb->data, src->data, src->len);
switch (key->type) {
case BTRFS_DIR_ITEM_KEY: