]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-02-15 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:52:37 +0000 (14:52 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:52:37 +0000 (14:52 +0000)
* nscd/nscd_helper.c (open_socket): Don't send padding bytes from
reqdata.

ChangeLog
nscd/nscd_helper.c

index 14133e47bca5358765f6f0180bd95b98909c055e..00a38c2ffa5726c16880555269691023866f1d98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-15  Ulrich Drepper  <drepper@redhat.com>
+
+       * nscd/nscd_helper.c (open_socket): Don't send padding bytes from
+       reqdata.
+
 2007-02-13  Ulrich Drepper  <drepper@redhat.com>
 
        * po/ru.po: Update from translation team.
index 50a58227b0104b25a5cd9812b304e59221656d07..af685a590bdaf0665869aeb9cee7cd4c0a5ee17a 100644 (file)
@@ -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;