From: Gustavo A. R. Silva Date: Fri, 9 Mar 2018 05:43:40 +0000 (-0600) Subject: pktgen: Remove VLA usage X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=35951393bbffa1ce351438bee264b48347c8cbb7;p=linux.git pktgen: Remove VLA usage In preparation to enabling -Wvla, remove VLA usage and replace it with a fixed-length array instead. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index d81bddd1bb807..e2d6ae3b290b9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -907,7 +907,7 @@ static ssize_t pktgen_if_write(struct file *file, if (debug) { size_t copy = min_t(size_t, count, 1023); - char tb[copy + 1]; + char tb[1024]; if (copy_from_user(tb, user_buffer, copy)) return -EFAULT; tb[copy] = 0;