summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 170ed72..f108627 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -410,6 +410,8 @@ md_clone (void *arg, char *name, int namelen, dev_t *dev)
i = dev_stdclone(name, NULL, "md", &u);
if (i == 0)
return;
+ if (u > DKMAXUNIT)
+ return;
/* XXX: should check that next char is [\0sa-h] */
/*
* Now we cheat: We just create the disk, but don't match.
OpenPOWER on IntegriCloud