diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-07-14 07:23:50 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-07-14 07:23:50 +0000 |
commit | f218b5f57242863c36eae65d926d4ee545994351 (patch) | |
tree | b8864837a286aaeb3e6226f9c9a95cde8d387077 /sunrpc | |
parent | ca3c01356495ebfbb315c2984dda8eba88467597 (diff) | |
download | glibc-f218b5f57242863c36eae65d926d4ee545994351.zip glibc-f218b5f57242863c36eae65d926d4ee545994351.tar.gz glibc-f218b5f57242863c36eae65d926d4ee545994351.tar.bz2 |
Update.
2000-07-14 Ulrich Drepper <drepper@redhat.com>
* sunrpc/xdr.c (xdr_u_long): Handle reading of unsigned long on
64-bit architecture correctly [PR libc/1794].
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/xdr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index 0cb5f25..e5d706d 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -181,7 +181,15 @@ xdr_u_long (XDR *xdrs, u_long *ulp) switch (xdrs->x_op) { case XDR_DECODE: - return XDR_GETLONG (xdrs, (long *) ulp); + { + long int tmp; + + if (XDR_GETLONG (xdrs, &tmp) == FALSE) + return FALSE; + + *ulp = (uint32_t) tmp; + return TRUE; + } case XDR_ENCODE: return XDR_PUTLONG (xdrs, (long *) ulp); |