diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdlib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 2948b54..f3a5ccd 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
| @@ -19,9 +19,13 @@ __fortify_realpath(const char *path, char *resolved) | |||
| 19 | size_t bos; | 19 | size_t bos; |
| 20 | 20 | ||
| 21 | if (resolved) { | 21 | if (resolved) { |
| 22 | #ifndef PATH_MAX | ||
| 23 | __builtin_trap(); | ||
| 24 | #else | ||
| 22 | bos = __builtin_object_size(resolved, 0); | 25 | bos = __builtin_object_size(resolved, 0); |
| 23 | if (PATH_MAX > bos) | 26 | if (PATH_MAX > bos) |
| 24 | __builtin_trap(); | 27 | __builtin_trap(); |
| 28 | #endif | ||
| 25 | } | 29 | } |
| 26 | return realpath(path, resolved); | 30 | return realpath(path, resolved); |
| 27 | } | 31 | } |
