summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-12-02 21:13:10 -0500
committerUlrich Drepper <drepper@gmail.com>2011-12-02 21:13:10 -0500
commit3a9654961929c2968c898d98ddfd3d840360080d (patch)
tree38693ef4f7c03c9c96cb447a6ee591028990750e /nis
parent9bea34736f85cba4452c6ee1138152c6df752094 (diff)
downloadglibc-3a9654961929c2968c898d98ddfd3d840360080d.tar.gz
glibc-3a9654961929c2968c898d98ddfd3d840360080d.tar.xz
glibc-3a9654961929c2968c898d98ddfd3d840360080d.zip
Remove aliasing problems in NIS code
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_findserv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c
index b1a9aa7e01..b02c63bdbc 100644
--- a/nis/nis_findserv.c
+++ b/nis/nis_findserv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2001, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -175,7 +175,9 @@ __nis_findfastest_with_timeout (dir_binding *bind,
 			(xdrproc_t) xdr_void, (caddr_t) 0,
 			*timeout);
     if (RPC_SUCCESS == rc) {
-      fastest = *((u_int32_t *) (cu->cu_inbuf)) - xid_seed;
+      u_int32_t val;
+      memcpy (&val, cu->cu_inbuf, sizeof (u_int32_t));
+      fastest = val - xid_seed;
       if (fastest < pings_count) {
 	bind->server_used = pings[fastest].server_nr;
 	bind->current_ep = pings[fastest].server_ep;