diff options
author | Damien Miller <djm@mindrot.org> | 2002-02-13 16:00:15 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-02-13 16:00:15 +1100 |
commit | 8e3bdca1da7d30542e9028f35f2a1cef052c85e4 (patch) | |
tree | 4c05c79248820c0c128db51a2cd2c74220cd66e8 /openbsd-compat/dirname.c | |
parent | 3db5f530d0fdf8044d6014ab12940efe0bbecca7 (diff) |
- (djm) Sync openbsd-compat with OpenBSD CVS too
Diffstat (limited to 'openbsd-compat/dirname.c')
-rw-r--r-- | openbsd-compat/dirname.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsd-compat/dirname.c b/openbsd-compat/dirname.c index a76a1dc1..391b2dd8 100644 --- a/openbsd-compat/dirname.c +++ b/openbsd-compat/dirname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirname.c,v 1.5 2001/06/27 00:58:54 lebel Exp $ */ +/* $OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -31,7 +31,7 @@ #ifndef HAVE_DIRNAME #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: dirname.c,v 1.5 2001/06/27 00:58:54 lebel Exp $"; +static char rcsid[] = "$OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $"; #endif /* LIBC_SCCS and not lint */ #include <errno.h> @@ -70,7 +70,7 @@ dirname(path) } while (endp > path && *endp == '/'); } - if (endp - path + 1 > sizeof(bname)) { + if (endp - path + 2 > sizeof(bname)) { errno = ENAMETOOLONG; return(NULL); } |