diff options
author | 2003-09-25 15:29:06 +0000 | |
---|---|---|
committer | 2003-09-25 15:29:06 +0000 | |
commit | 33dbff990b96c9a2c41da69f6a50856bdd9d0de1 (patch) | |
tree | a64ed6af45978a48e8b6d7fab2b63cb96530f1ba /bin/csh | |
parent | Fix one case of set length before realloc. Fix another case of (diff) | |
download | wireguard-openbsd-33dbff990b96c9a2c41da69f6a50856bdd9d0de1.tar.xz wireguard-openbsd-33dbff990b96c9a2c41da69f6a50856bdd9d0de1.zip |
Fix a bug where one byte past the end of a buffer could be touched
in certain cases; closes PR 3163
Diffstat (limited to 'bin/csh')
-rw-r--r-- | bin/csh/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/csh/dir.c b/bin/csh/dir.c index e1dd57294c3..5b658c45552 100644 --- a/bin/csh/dir.c +++ b/bin/csh/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.12 2003/06/11 21:09:50 deraadt Exp $ */ +/* $OpenBSD: dir.c,v 1.13 2003/09/25 15:29:06 millert Exp $ */ /* $NetBSD: dir.c,v 1.9 1995/03/21 09:02:42 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: dir.c,v 1.12 2003/06/11 21:09:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dir.c,v 1.13 2003/09/25 15:29:06 millert Exp $"; #endif #endif /* not lint */ @@ -651,8 +651,8 @@ dcanon(Char *cp, Char *p) continue; p = sp; /* save start of component */ slash = 0; - while (*++p) /* find next slash or end of path */ - if (*p == '/') { + while (*p) /* find next slash or end of path */ + if (*++p == '/') { slash = 1; *p = 0; break; |