]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
config: add 'homehost' option to 'AUTO' line.
[thirdparty/mdadm.git] / super-ddf.c
index 870efd8296063633253214c82974d83af09829c8..c2c562f1ec19d37cae50016cc612a03b02ad55bf 100644 (file)
@@ -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) &&