summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-03-09 13:55:59 +1100
committerNeilBrown <neilb@suse.de>2009-03-09 13:55:59 +1100
commite5a2a3cf8c2342836b994d9cd844ef3c8ad35597 (patch)
tree716283a5cf8f58726d074879817c5d386480541b /super-ddf.c
parentcfccea8c1723845cfc40fa7b91cbc39d7196fcea (diff)
downloadmdadm-e5a2a3cf8c2342836b994d9cd844ef3c8ad35597.tar.gz
mdadm-e5a2a3cf8c2342836b994d9cd844ef3c8ad35597.tar.xz
mdadm-e5a2a3cf8c2342836b994d9cd844ef3c8ad35597.zip
ddf: fix memory corruption bug.
When adding to a point, you don't need to multiple by the size of the pointer - C does that for you!
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-ddf.c b/super-ddf.c
index ad9b22d..7ca79fb 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1982,7 +1982,7 @@ static int init_super_ddf_bvd(struct supertype *st,
memset(vc->vendor, 0xff, 32);
memset(vc->phys_refnum, 0xff, 4*ddf->mppe);
- memset(vc->phys_refnum+(ddf->mppe * 4), 0x00, 8*ddf->mppe);
+ memset(vc->phys_refnum+ddf->mppe, 0x00, 8*ddf->mppe);
vcl->next = ddf->conflist;
ddf->conflist = vcl;