From 858b38cefc9c1a99d20f5ef0445b6d687094e460 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Tue, 27 Apr 2010 08:21:28 +0200 Subject: [PATCH] md 0.9: fix out of bound write memory operation --- src/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/md.c b/src/md.c index 99812a98..1ad91e40 100644 --- a/src/md.c +++ b/src/md.c @@ -208,7 +208,7 @@ int recover_MD(disk_t *disk_car, const struct mdp_superblock_s *sb, partition_t { partition->part_size=(uint64_t)(le32(sb->size)<<1)*disk_car->sector_size+MD_RESERVED_BYTES; memcpy(&partition->part_uuid, &sb->set_uuid0, 4); - memcpy(&partition->part_uuid+4, &sb->set_uuid1, 3*4); + memcpy((char*)(&partition->part_uuid)+4, &sb->set_uuid1, 3*4); } else {