diff options
author | Luca Berra <bluca@comedia.it> | 2010-12-12 11:33:55 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-12-13 13:51:07 +1100 |
commit | a2973b6af235f993b3085cfb51bc50cc6ca38d38 (patch) | |
tree | b46f7b0be8a3427426daedc0035adc3dabafca60 /super-intel.c | |
parent | cd19c0cf1c52ce765bf27791b5ef0ee4cdc4c8db (diff) |
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 <bluca@comedia.it>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |