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>
This commit is contained in:
parent
cd19c0cf1c
commit
a2973b6af2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue