[PATCH] Properly size the leafsize field in the mdrestore_struct struct.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's 32 bits as defined in ctree.h, but the struct had it as 64 bits.

Found using MemorySanitizer.

Signed-off-by: Adam Buchbinder <abuchbinder@xxxxxxxxxx>
---
 btrfs-image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-image.c b/btrfs-image.c
index cf1fe2d..98d765a 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -128,7 +128,7 @@ struct mdrestore_struct {
 	struct rb_root chunk_tree;
 	struct list_head list;
 	size_t num_items;
-	u64 leafsize;
+	u32 leafsize;
 	u64 devid;
 	u8 uuid[BTRFS_UUID_SIZE];
 	u8 fsid[BTRFS_FSID_SIZE];
-- 
2.0.0.526.g5318336

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux