aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/rpcb_clnt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 03ae007641e4..2caa7edeeaba 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -703,11 +703,16 @@ static int rpcb_decode_getaddr(struct rpc_rqst *req, __be32 *p,
703 *portp = 0; 703 *portp = 0;
704 addr_len = ntohl(*p++); 704 addr_len = ntohl(*p++);
705 705
706 if (addr_len == 0) {
707 dprintk("RPC: rpcb_decode_getaddr: "
708 "service is not registered\n");
709 return 0;
710 }
711
706 /* 712 /*
707 * Simple sanity check. The smallest possible universal 713 * Simple sanity check.
708 * address is an IPv4 address string containing 11 bytes.
709 */ 714 */
710 if (addr_len < 11 || addr_len > RPCBIND_MAXUADDRLEN) 715 if (addr_len > RPCBIND_MAXUADDRLEN)
711 goto out_err; 716 goto out_err;
712 717
713 /* 718 /*