diff --git a/[refs] b/[refs] index 5bdd4aeff9bc..8eafd55ff40d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8acfe468b0384e834a303f08ebc4953d72fb690a +refs/heads/master: 448d7b5daf043d109df98e3e8f8deb165c2e8896 diff --git a/trunk/net/core/pktgen.c b/trunk/net/core/pktgen.c index 679b797d06b1..fbce4b05a53e 100644 --- a/trunk/net/core/pktgen.c +++ b/trunk/net/core/pktgen.c @@ -887,10 +887,11 @@ static ssize_t pktgen_if_write(struct file *file, i += len; if (debug) { - char tb[count + 1]; - if (copy_from_user(tb, user_buffer, count)) + size_t copy = min(count, 1023); + char tb[copy + 1]; + if (copy_from_user(tb, user_buffer, copy)) return -EFAULT; - tb[count] = 0; + tb[copy] = 0; printk(KERN_DEBUG "pktgen: %s,%lu buffer -:%s:-\n", name, (unsigned long)count, tb); }