mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-30 12:31:53 +08:00
UPdate.
* nscd/nscd_helper.c (get_mapping): Correctly check cmsg length. Avoid file descriptor leak in case of size mismatch.
This commit is contained in:
parent
568470bbff
commit
407c4b9a19
@ -1,5 +1,8 @@
|
|||||||
2004-09-12 Ulrich Drepper <drepper@redhat.com>
|
2004-09-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nscd/nscd_helper.c (get_mapping): Correctly check cmsg length.
|
||||||
|
Avoid file descriptor leak in case of size mismatch.
|
||||||
|
|
||||||
* nscd/nscd-client.h: Fix database structure layout for biarch.
|
* nscd/nscd-client.h: Fix database structure layout for biarch.
|
||||||
* nscd/mem.c (gc): Add casts to avoid warnings.
|
* nscd/mem.c (gc): Add casts to avoid warnings.
|
||||||
|
|
||||||
|
@ -138,10 +138,12 @@ get_mapping (request_type type, const char *key,
|
|||||||
/* Failure or timeout. */
|
/* Failure or timeout. */
|
||||||
goto out_close2;
|
goto out_close2;
|
||||||
|
|
||||||
if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen
|
if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen)
|
||||||
|| msg.msg_controllen != CMSG_LEN (sizeof (int)))
|
|
||||||
goto out_close2;
|
goto out_close2;
|
||||||
|
|
||||||
|
if (CMSG_FIRSTHDR (&msg)->cmsg_len != CMSG_LEN (sizeof (int)))
|
||||||
|
goto out_close;
|
||||||
|
|
||||||
mapfd = *(int *) CMSG_DATA (cmsg);
|
mapfd = *(int *) CMSG_DATA (cmsg);
|
||||||
|
|
||||||
struct stat64 st;
|
struct stat64 st;
|
||||||
|
Loading…
Reference in New Issue
Block a user