Alan Somers 9ad1d357e0 fix integer underflow in getgrnam_r and getpwnam_r
Sometimes nscd(8) will return a 1-byte buffer for a nonexistent entry. This
triggered an integer underflow in grp_unmarshal_func, causing getgrnam_r to
return ERANGE instead of 0.

Fix the user's buffer size check, and add a correct check for a too-small
nscd buffer.

PR:		248932
Event:		September 2020 Bugathon
Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Axcient
Differential Revision: https://reviews.freebsd.org/D26204
2020-09-19 19:08:27 +00:00
..
2017-02-28 23:42:47 +00:00
2020-04-13 08:42:13 +00:00
2020-04-13 08:42:13 +00:00
2020-04-13 08:42:13 +00:00
2017-12-08 22:06:18 +00:00
2017-05-23 06:53:31 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2019-08-01 18:51:06 +00:00
2017-02-28 23:42:47 +00:00
2017-05-23 06:56:57 +00:00
2020-05-15 11:58:01 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2018-08-07 15:24:19 +00:00
2017-02-28 23:42:47 +00:00
2020-03-12 18:28:23 +00:00
2017-05-23 09:29:05 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-09-09 18:07:13 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-04-26 14:28:27 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2018-02-27 10:55:33 +00:00
2017-02-28 23:42:47 +00:00
2019-07-17 19:41:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-08-10 21:41:49 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-03-30 21:25:00 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-08-31 21:55:25 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-09-09 18:07:13 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-12-06 22:06:48 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-02-26 18:55:09 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2020-01-21 16:31:08 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00