summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-09-24 06:57:26 +0000
committerdas <das@FreeBSD.org>2004-09-24 06:57:26 +0000
commit899ec14cac0f86a548b98fae890dfb402ec4570d (patch)
tree1765cb6d4e214a0a2dcb33311472a23eef48a093 /bin
parentf42b730c71c74c46097ad66ad94d0190a3abdfa6 (diff)
downloadFreeBSD-src-899ec14cac0f86a548b98fae890dfb402ec4570d.zip
FreeBSD-src-899ec14cac0f86a548b98fae890dfb402ec4570d.tar.gz
Don't read the byte at *argv[strlen(*argv) + 1].
PR: 71743
Diffstat (limited to 'bin')
-rw-r--r--bin/mkdir/mkdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c
index c0a9ffd..5bb41c3 100644
--- a/bin/mkdir/mkdir.c
+++ b/bin/mkdir/mkdir.c
@@ -147,7 +147,7 @@ build(char *path, mode_t omode)
else if (p[0] != '/')
continue;
*p = '\0';
- if (p[1] == '\0')
+ if (!last && p[1] == '\0')
last = 1;
if (first) {
/*
OpenPOWER on IntegriCloud