diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-14 20:13:19 +0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-14 20:13:19 +0400 |
| commit | f2e5d078f7f02d4289db31f5f63e23e39914075e (patch) | |
| tree | c739a3e70846284ae2ce3d98cecc2be1ffebe2e2 /net/sunrpc/rpcb_clnt.c | |
| parent | c66a566afbe6e2c94b1ae70f70cc1e3d4c73639b (diff) | |
| parent | 836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff) | |
| download | linux-f2e5d078f7f02d4289db31f5f63e23e39914075e.tar.xz | |
Merge tag 'v3.8-rc7' into regulator-core
Linux 3.8-rc7
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
| -rw-r--r-- | net/sunrpc/rpcb_clnt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index a70acae496e4..795a0f4e920b 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -23,7 +23,6 @@ #include <linux/errno.h> #include <linux/mutex.h> #include <linux/slab.h> -#include <linux/nsproxy.h> #include <net/ipv6.h> #include <linux/sunrpc/clnt.h> @@ -884,7 +883,10 @@ static void encode_rpcb_string(struct xdr_stream *xdr, const char *string, u32 len; len = strlen(string); - BUG_ON(len > maxstrlen); + WARN_ON_ONCE(len > maxstrlen); + if (len > maxstrlen) + /* truncate and hope for the best */ + len = maxstrlen; p = xdr_reserve_space(xdr, 4 + len); xdr_encode_opaque(p, string, len); } |
