diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ipc/shmget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipc/shmget.c b/src/ipc/shmget.c index 61fb11d9..b44f9d68 100644 --- a/src/ipc/shmget.c +++ b/src/ipc/shmget.c @@ -1,9 +1,11 @@ #include <sys/shm.h> +#include <stdint.h> #include "syscall.h" #include "ipc.h" int shmget(key_t key, size_t size, int flag) { + if (size > PTRDIFF_MAX) size = SIZE_MAX; #ifdef SYS_shmget return syscall(SYS_shmget, key, size, flag); #else |