From 75c2df6509391e28257d696815bddb854a8c4a94 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 7 Sep 2011 12:45:24 +1000 Subject: [PATCH] FIX: Prevent using null list pointer When not all attributes are supported (attributes incompatibility) function container_content_imsm returns NULL pointer. We need to cope with a NULL list better. Reported-by: Lukasz Dorau Signed-off-by: NeilBrown --- Incremental.c | 2 +- policy.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Incremental.c b/Incremental.c index 951c2a07..09cdd9b4 100644 --- a/Incremental.c +++ b/Incremental.c @@ -1464,7 +1464,7 @@ static int Incremental_container(struct supertype *st, char *devname, fprintf(stderr, Name ": failed to get exclusive lock on " "mapfile\n"); /* do not assemble arrays that might have bad blocks */ - if (list->array.state & (1<array.state & (1<devs ; mdi ; mdi = mdi->next) domainlist_add_dev(&domlist, makedev(mdi->disk.major, mdi->disk.minor), -- 2.39.2