Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 2003d1abfa0c20ee77815f0da33e2c1c > files > 124

glibc-2.5-49.el5_5.5.src.rpm

2007-02-15  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_helper.c (open_socket): Don't send padding bytes from
	reqdata.

--- libc/nscd/nscd_helper.c	2 Feb 2007 15:53:35 -0000	1.21
+++ libc/nscd/nscd_helper.c	16 Feb 2007 06:34:19 -0000	1.22
@@ -187,6 +187,7 @@ get_mapping (request_type type, const ch
     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 ch
 #  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;