mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
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>
This commit is contained in:
parent
ddc01c0813
commit
adc24df81d
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue