diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libc/stdlib/realpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/realpath.c b/src/lib/libc/stdlib/realpath.c index 78c286014d..0288601464 100644 --- a/src/lib/libc/stdlib/realpath.c +++ b/src/lib/libc/stdlib/realpath.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #if defined(LIBC_SCCS) && !defined(lint) | 37 | #if defined(LIBC_SCCS) && !defined(lint) |
| 38 | static char *rcsid = "$OpenBSD: realpath.c,v 1.3 1997/06/20 20:37:45 deraadt Exp $"; | 38 | static char *rcsid = "$OpenBSD: realpath.c,v 1.4 1998/05/18 09:55:19 deraadt Exp $"; |
| 39 | #endif /* LIBC_SCCS and not lint */ | 39 | #endif /* LIBC_SCCS and not lint */ |
| 40 | 40 | ||
| 41 | #include <sys/param.h> | 41 | #include <sys/param.h> |
| @@ -105,7 +105,7 @@ loop: | |||
| 105 | errno = ELOOP; | 105 | errno = ELOOP; |
| 106 | goto err1; | 106 | goto err1; |
| 107 | } | 107 | } |
| 108 | n = readlink(p, resolved, MAXPATHLEN); | 108 | n = readlink(p, resolved, MAXPATHLEN-1); |
| 109 | if (n < 0) | 109 | if (n < 0) |
| 110 | goto err1; | 110 | goto err1; |
| 111 | resolved[n] = '\0'; | 111 | resolved[n] = '\0'; |
