When calling mdadm -C --metadata=imsm -l 1 /dev/sd.. mdadm segfaults in default_chunk_imsm() above syntax is incorrect, but mdadm should error instead of segfaulting -- Luca Berra -- bluca@xxxxxxxxxx
When calling mdadm -C --metadata=imsm -l 1 /dev/sd.. mdadm segfaults in default_chunk_imsm() above syntax is incorrect, but mdadm should error instead of segfaulting Signed-off-by: Luca Berra <bluca@xxxxxxxxxx> diff -p -up mdadm-3.1.4/super-intel.c.bluca mdadm-3.1.4/super-intel.c --- mdadm-3.1.4/super-intel.c.bluca 2010-08-26 02:24:16.000000000 +0000 +++ mdadm-3.1.4/super-intel.c 2010-12-12 11:13:00.024371004 +0000 @@ -4119,7 +4119,7 @@ static int default_chunk_imsm(struct sup { struct intel_super *super = st->sb; - if (!super->orom) + if (!super || !super->orom) return 0; return imsm_orom_default_chunk(super->orom);