Robustify libc-side nscd database reader.
commitb9e0df9847f3460c67e27e631af8662e7906ed6b
authorJakub Jelinek <jakub@redhat.com>
Sat, 16 May 2009 04:17:08 +0000 (15 21:17 -0700)
committerPetr Baudis <pasky@suse.cz>
Fri, 22 May 2009 02:54:50 +0000 (22 04:54 +0200)
tree2b7f681156ce2671b60a1afb60bdbcb11bd43440
parentf27dc66bb946b74df6817768758b1de49d4be887
Robustify libc-side nscd database reader.

The nscd database mapped in processes can change at any time.  We
have to be more vigilant when it comes to using that memory.  Test
the data entries are valid in their entire size, don't read data
again from memory once we verified it, and make sure the trailing
pointer is not going off the deep end.
(cherry picked from commit cfe1fc1013d0e7e4863c974fa0e78891cc0a2ed2)
ChangeLog
nscd/nscd-client.h
nscd/nscd_getai.c
nscd/nscd_getgr_r.c
nscd/nscd_gethst_r.c
nscd/nscd_getpw_r.c
nscd/nscd_getserv_r.c
nscd/nscd_helper.c
nscd/nscd_initgroups.c