/[base]
ViewVC logotype

Revision 365910


Jump to revision: Previous Next
Author: asomers
Date: Sat Sep 19 19:08:27 2020 UTC (3 years, 9 months ago)
Changed paths: 2
Log Message:
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


Changed paths

Path Details
Directoryhead/lib/libc/gen/getgrent.c modified , text changed
Directoryhead/lib/libc/gen/getpwent.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27