SHA256
1
0
forked from pool/glibc
glibc/glibc-getgroups-fortify.diff

15 lines
631 B
Diff

Index: glibc/posix/bits/unistd.h
===================================================================
--- posix/bits/unistd.h 2007-10-16 14:58:46.000000000 +0200
+++ posix/bits/unistd.h 2008-09-18 11:38:25.000000000 +0200
@@ -270,7 +270,8 @@ __NTH (getgroups (int __size, __gid_t __
if (!__builtin_constant_p (__size))
return __getgroups_chk (__size, __list, __bos (__list));
- if (__size * sizeof (__gid_t) > __bos (__list))
+ if (__size > 0
+ && __size * sizeof (__gid_t) > __bos (__list))
return __getgroups_chk_warn (__size, __list, __bos (__list));
}
return __getgroups_alias (__size, __list);