diff options
Diffstat (limited to 'include/unistd.h')
| -rw-r--r-- | include/unistd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h index 45304e1..5274e22 100644 --- a/include/unistd.h +++ b/include/unistd.h | |||
| @@ -71,7 +71,7 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t *__s) | |||
| 71 | { | 71 | { |
| 72 | size_t __b = __builtin_object_size(__s, 0); | 72 | size_t __b = __builtin_object_size(__s, 0); |
| 73 | 73 | ||
| 74 | if (__l > __b / sizeof(gid_t)) | 74 | if (__l < 0 || (size_t)__l > __b / sizeof(gid_t)) |
| 75 | __builtin_trap(); | 75 | __builtin_trap(); |
| 76 | return __orig_getgroups(__l, __s); | 76 | return __orig_getgroups(__l, __s); |
| 77 | } | 77 | } |
