fix off-by-one error in getgrnam_r and getgrgid_r, clobbering gr_name
authorRich Felker <dalias@aerifal.cx>
Sun, 29 Sep 2013 06:52:33 +0000 (02:52 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 29 Sep 2013 06:52:33 +0000 (02:52 -0400)
commit23b8e3bc95620b0bd90a78ce0d926942c12b45da
treeb4ef44467f7890cb88a56d939d2d19e6bd2c7643
parent211264e46a2f1bc382a84435e904d1548de672b0
fix off-by-one error in getgrnam_r and getgrgid_r, clobbering gr_name

bug report and patch by Michael Forney. the terminating null pointer
at the end of the gr_mem array was overwriting the beginning of the
string data, causing the gr_name member to always be a zero-length
string.
src/passwd/getgr_r.c