/[base]
ViewVC logotype

Revision 368085


Jump to revision: Previous Next
Author: asomers
Date: Thu Nov 26 23:34:02 2020 UTC (3 years, 7 months ago)
Changed paths: 3
Log Message:
MFC r365910:

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
Sponsored by:	Axcient
Differential Revision: https://reviews.freebsd.org/D26204


Changed paths

Path Details
Directorystable/12/ modified , props changed
Directorystable/12/lib/libc/gen/getgrent.c modified , text changed
Directorystable/12/lib/libc/gen/getpwent.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27