From 8e3bdca1da7d30542e9028f35f2a1cef052c85e4 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 13 Feb 2002 16:00:15 +1100 Subject: - (djm) Sync openbsd-compat with OpenBSD CVS too --- openbsd-compat/dirname.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbsd-compat/dirname.c') 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 @@ -/* $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 @@ -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 @@ -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); } -- cgit v1.2.3