summaryrefslogtreecommitdiff
path: root/net/ipv4/netfilter/ipt_CLUSTERIP.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-04-18 13:19:07 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-04-18 13:19:07 -0700
commit775d71e49c65f1f6aa57776ea1da62988fc9a30a (patch)
treece03cae544bacc8dda67422fd66a543dd1ae3c99 /net/ipv4/netfilter/ipt_CLUSTERIP.c
parent18e82d2b952ab57fc1c8a69d4fa14e562f2aecf6 (diff)
parentc1a952f48517b5545075d8eb1a5d543099bd2ae1 (diff)
Merge branch 'upstream/linaro.38' into linaro-android.38KNOWN_GOOD
Diffstat (limited to 'net/ipv4/netfilter/ipt_CLUSTERIP.c')
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 1e26a489765..af7dec683e1 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -669,8 +669,11 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input,
char buffer[PROC_WRITELEN+1];
unsigned long nodenum;
- if (copy_from_user(buffer, input, PROC_WRITELEN))
+ if (size > PROC_WRITELEN)
+ return -EIO;
+ if (copy_from_user(buffer, input, size))
return -EFAULT;
+ buffer[size] = 0;
if (*buffer == '+') {
nodenum = simple_strtoul(buffer+1, NULL, 10);