From 7ce13b410d3cdf5c3365b9525e3a8a213f7f3c05 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 26 Sep 2017 23:19:54 +0200 Subject: pfinet: Fix array size hardcoded value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as hinted by Joan Lledó * pfinet/iioctl-ops.c (get_dev): Set ifname size to IFNAMSIZ instead of hardcoded value --- pfinet/iioctl-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pfinet/iioctl-ops.c') diff --git a/pfinet/iioctl-ops.c b/pfinet/iioctl-ops.c index f1c503d4..be659582 100644 --- a/pfinet/iioctl-ops.c +++ b/pfinet/iioctl-ops.c @@ -49,7 +49,7 @@ extern void inquire_device (struct device *dev, uint32_t *addr, /* Truncate name, take the global lock and find device with this name. */ struct device *get_dev (char *name) { - char ifname[16]; + char ifname[IFNAMSIZ]; struct device *dev; memcpy (ifname, name, IFNAMSIZ-1); -- cgit v1.2.3