X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=super-ddf.c;h=c2c562f1ec19d37cae50016cc612a03b02ad55bf;hb=d1d3482b562369b0d32e4267c2e245a3371d1f10;hp=870efd8296063633253214c82974d83af09829c8;hpb=5a9de8db047646e1e59d90afc478d1820736324d;p=thirdparty%2Fmdadm.git diff --git a/super-ddf.c b/super-ddf.c index 870efd82..c2c562f1 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1260,7 +1260,11 @@ static int match_home_ddf(struct supertype *st, char *homehost) * the hostname */ struct ddf_super *ddf = st->sb; - int len = strlen(homehost); + int len; + + if (!homehost) + return 0; + len = strlen(homehost); return (memcmp(ddf->controller.guid, T10, 8) == 0 && len < sizeof(ddf->controller.vendor_data) &&