summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdopen.c b/mdopen.c
index c9fda131..e49defb6 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -376,7 +376,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
sprintf(devname, "/dev/%s", devnm);
- if (dev && dev[0] == '/')
+ if (dev && dev[0] == '/' && strlen(dev) < 400)
strcpy(chosen, dev);
else if (cname[0] == 0)
strcpy(chosen, devname);