From 00212762793d60ca5cc7abfaaa711bf10057f027 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 14:52:37 +0000 Subject: [PATCH] 2007-02-15 Ulrich Drepper * nscd/nscd_helper.c (open_socket): Don't send padding bytes from reqdata. --- ChangeLog | 5 +++++ nscd/nscd_helper.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14133e47bca..00a38c2ffa5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-15 Ulrich Drepper + + * nscd/nscd_helper.c (open_socket): Don't send padding bytes from + reqdata. + 2007-02-13 Ulrich Drepper * po/ru.po: Update from translation team. diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 50a58227b01..af685a590bd 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -187,6 +187,7 @@ get_mapping (request_type type, const char *key, request_header req; char key[keylen]; } reqdata; + size_t real_sizeof_reqdata = sizeof (request_header) + keylen; int sock = open_socket (); if (sock < 0) @@ -201,9 +202,9 @@ get_mapping (request_type type, const char *key, # define MSG_NOSIGNAL 0 # endif if (__builtin_expect (TEMP_FAILURE_RETRY (__send (sock, &reqdata, - sizeof (reqdata), + real_sizeof_reqdata, MSG_NOSIGNAL)) - != sizeof (reqdata), 0)) + != real_sizeof_reqdata, 0)) /* We cannot even write the request. */ goto out_close2; -- 2.47.2