about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 74983b9762..ff27b0797e 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -138,10 +138,12 @@ get_mapping (request_type type, const char *key,
     /* Failure or timeout.  */
     goto out_close2;
 
-  if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen
-      || msg.msg_controllen != CMSG_LEN (sizeof (int)))
+  if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen)
     goto out_close2;
 
+  if (CMSG_FIRSTHDR (&msg)->cmsg_len != CMSG_LEN (sizeof (int)))
+    goto out_close;
+
   mapfd = *(int *) CMSG_DATA (cmsg);
 
   struct stat64 st;