diff options
author | 2005-07-18 03:03:49 +0000 | |
---|---|---|
committer | 2005-07-18 03:03:49 +0000 | |
commit | 931ab4110611adefe672922f01d664dba3ad6619 (patch) | |
tree | 7c93c79f67a7fc86a45becdd7d32f70794b5e11d /sunrpc/xdr.c | |
parent | 2005-06-13 Jakub Jelinek <jakub@redhat.com> (diff) | |
download | glibc-931ab4110611adefe672922f01d664dba3ad6619.tar.xz glibc-931ab4110611adefe672922f01d664dba3ad6619.zip |
2005-06-25 Jakub Jelinek <jakub@redhat.com>
[BZ #1097]
* sunrpc/xdr.c (xdr_hyper, xdr_u_hyper): When decoding, cast
t2 to uint32_t instead of ulong.
* sunrpc/Makefile (tests): Add tst-xdrmem.
* sunrpc/tst-xdrmem.c: New test.
Diffstat (limited to '')
-rw-r--r-- | sunrpc/xdr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index d99a9985c4..4213907d96 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -240,7 +240,7 @@ xdr_hyper (XDR *xdrs, quad_t *llp) if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2)) return FALSE; *llp = ((quad_t) t1) << 32; - *llp |= t2; + *llp |= (uint32_t) t2; return TRUE; } @@ -274,7 +274,7 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp) if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2)) return FALSE; *ullp = ((u_quad_t) t1) << 32; - *ullp |= t2; + *ullp |= (uint32_t) t2; return TRUE; } |