summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/unistd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 71dda84..09980ba 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -75,7 +75,7 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t *__s)
75{ 75{
76 size_t __b = __builtin_object_size(__s, 0); 76 size_t __b = __builtin_object_size(__s, 0);
77 77
78 if (__l < 0 || (size_t)__l > __b / sizeof(gid_t)) 78 if (__l > 0 && (unsigned)__l > __b / sizeof(gid_t))
79 __builtin_trap(); 79 __builtin_trap();
80 return __orig_getgroups(__l, __s); 80 return __orig_getgroups(__l, __s);
81} 81}