Message ID | 20170120190333.17737-1-rgoldwyn@suse.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Fri, Jan 20, 2017 at 01:03:33PM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgoldwyn@suse.com> > > 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> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/image/main.c b/image/main.c index 58dcecb..0158844 100644 --- a/image/main.c +++ b/image/main.c @@ -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: