diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/realpath.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/realpath.c b/src/lib/libc/stdlib/realpath.c index e06db59088..7b70b9ddfb 100644 --- a/src/lib/libc/stdlib/realpath.c +++ b/src/lib/libc/stdlib/realpath.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: realpath.c,v 1.18 2014/10/19 03:56:28 doug Exp $ */ | 1 | /* $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> | 3 | * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> |
| 4 | * | 4 | * |
| @@ -27,13 +27,13 @@ | |||
| 27 | * SUCH DAMAGE. | 27 | * SUCH DAMAGE. |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #include <sys/param.h> | ||
| 31 | #include <sys/stat.h> | 30 | #include <sys/stat.h> |
| 32 | 31 | ||
| 33 | #include <errno.h> | 32 | #include <errno.h> |
| 34 | #include <stdlib.h> | 33 | #include <stdlib.h> |
| 35 | #include <string.h> | 34 | #include <string.h> |
| 36 | #include <unistd.h> | 35 | #include <unistd.h> |
| 36 | #include <limits.h> | ||
| 37 | 37 | ||
| 38 | /* A slightly modified copy of this file exists in libexec/ld.so */ | 38 | /* A slightly modified copy of this file exists in libexec/ld.so */ |
| 39 | 39 | ||
| @@ -156,7 +156,7 @@ realpath(const char *path, char *resolved) | |||
| 156 | goto err; | 156 | goto err; |
| 157 | } | 157 | } |
| 158 | if (S_ISLNK(sb.st_mode)) { | 158 | if (S_ISLNK(sb.st_mode)) { |
| 159 | if (symlinks++ > MAXSYMLINKS) { | 159 | if (symlinks++ > SYMLOOP_MAX) { |
| 160 | errno = ELOOP; | 160 | errno = ELOOP; |
| 161 | goto err; | 161 | goto err; |
| 162 | } | 162 | } |
