提交 adc24df8 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

SUNRPC: Fix a signed v. unsigned comparison in rpcbind's XDR routines

Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 ddc01c08
...@@ -490,10 +490,11 @@ static int rpcb_decode_getaddr(struct rpc_rqst *req, __be32 *p, ...@@ -490,10 +490,11 @@ static int rpcb_decode_getaddr(struct rpc_rqst *req, __be32 *p,
unsigned short *portp) unsigned short *portp)
{ {
char *addr; char *addr;
int addr_len, c, i, f, first, val; u32 addr_len;
int c, i, f, first, val;
*portp = 0; *portp = 0;
addr_len = (unsigned int) ntohl(*p++); addr_len = ntohl(*p++);
if (addr_len > RPCB_MAXADDRLEN) /* sanity */ if (addr_len > RPCB_MAXADDRLEN) /* sanity */
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册