diff options
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/getdents.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/linux/getdents.c b/src/linux/getdents.c index de6de3b4..796c1e5c 100644 --- a/src/linux/getdents.c +++ b/src/linux/getdents.c @@ -1,9 +1,11 @@ #define _BSD_SOURCE #include <dirent.h> +#include <limits.h> #include "syscall.h" int getdents(int fd, struct dirent *buf, size_t len) { + if (len>INT_MAX) len = INT_MAX; return syscall(SYS_getdents, fd, buf, len); } |