summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-10-22 10:18:45 +0000
committerphk <phk@FreeBSD.org>2001-10-22 10:18:45 +0000
commit211e34739b6e93940fa8b12c9c5ed1e27ec596cb (patch)
tree135fbca32de7acc732a97c5c0f9ca733c09e38af /sys/kern/subr_disk.c
parent4ad78f55351b79384a81a09e6a6a6859ea4fd2e8 (diff)
downloadFreeBSD-src-211e34739b6e93940fa8b12c9c5ed1e27ec596cb.zip
FreeBSD-src-211e34739b6e93940fa8b12c9c5ed1e27ec596cb.tar.gz
disk_clone() was a bit too eager to please: "md0s1ec" is not a valid
device. Noticed by: Chad David <davidc@acns.ab.ca>
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 4efc5b2..bb52bf0 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -78,6 +78,8 @@ disk_clone(void *arg, char *name, int namelen, dev_t *dev)
}
if (name[i] == '\0')
;
+ else if (name[i + 1] != '\0')
+ return;
else if (name[i] < 'a' || name[i] > 'h')
continue;
else
OpenPOWER on IntegriCloud