diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-08-06 11:56:31 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:15:41 -0400 |
commit | adc24df81d6903d2d6280d77e936aa5e1670d7a1 (patch) | |
tree | 95f4cc417815e4cba7c3016e0d77aea5f1bc0fdd /net/sunrpc/rpcb_clnt.c | |
parent | ddc01c0813dc07ca7a2bd32c143a9b54a64915ce (diff) |
SUNRPC: Fix a signed v. unsigned comparison in rpcbind's XDR routines
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index d1740dbab991..a9d2cdc8e32c 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -490,10 +490,11 @@ static int rpcb_decode_getaddr(struct rpc_rqst *req, __be32 *p, unsigned short *portp) { char *addr; - int addr_len, c, i, f, first, val; + u32 addr_len; + int c, i, f, first, val; *portp = 0; - addr_len = (unsigned int) ntohl(*p++); + addr_len = ntohl(*p++); if (addr_len > RPCB_MAXADDRLEN) /* sanity */ return -EINVAL; |