From a2973b6af235f993b3085cfb51bc50cc6ca38d38 Mon Sep 17 00:00:00 2001 From: Luca Berra Date: Sun, 12 Dec 2010 11:33:55 +0100 Subject: [PATCH] segfault in imsm create with wrong arguments 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 Signed-off-by: NeilBrown --- super-intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/super-intel.c b/super-intel.c index b880a74c..b3a116f9 100644 --- a/super-intel.c +++ b/super-intel.c @@ -4119,7 +4119,7 @@ static int default_chunk_imsm(struct supertype *st) { struct intel_super *super = st->sb; - if (!super->orom) + if (!super || !super->orom) return 0; return imsm_orom_default_chunk(super->orom); -- 2.47.2