diff options
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 a76a1dc13..391b2dd81 100644 --- a/openbsd-compat/dirname.c +++ b/openbsd-compat/dirname.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dirname.c,v 1.5 2001/06/27 00:58:54 lebel Exp $ */ | 1 | /* $OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> |
@@ -31,7 +31,7 @@ | |||
31 | #ifndef HAVE_DIRNAME | 31 | #ifndef HAVE_DIRNAME |
32 | 32 | ||
33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) |
34 | static char rcsid[] = "$OpenBSD: dirname.c,v 1.5 2001/06/27 00:58:54 lebel Exp $"; | 34 | static char rcsid[] = "$OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $"; |
35 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ |
36 | 36 | ||
37 | #include <errno.h> | 37 | #include <errno.h> |
@@ -70,7 +70,7 @@ dirname(path) | |||
70 | } while (endp > path && *endp == '/'); | 70 | } while (endp > path && *endp == '/'); |
71 | } | 71 | } |
72 | 72 | ||
73 | if (endp - path + 1 > sizeof(bname)) { | 73 | if (endp - path + 2 > sizeof(bname)) { |
74 | errno = ENAMETOOLONG; | 74 | errno = ENAMETOOLONG; |
75 | return(NULL); | 75 | return(NULL); |
76 | } | 76 | } |