summaryrefslogtreecommitdiff
path: root/openbsd-compat/dirname.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/dirname.c')
-rw-r--r--openbsd-compat/dirname.c6
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);
}