]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: fix memory corruption bug.
authorNeilBrown <neilb@suse.de>
Mon, 9 Mar 2009 02:55:59 +0000 (13:55 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 9 Mar 2009 02:55:59 +0000 (13:55 +1100)
When adding to a point, you don't need to multiple by the size
of the pointer - C does that for you!

super-ddf.c

index ad9b22d1a06a419f1e096b68d80197917bdceff1..7ca79fb778a7b9197ef69937ce086ec30f4c292a 100644 (file)
@@ -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;