From 33ce512c476330e7e4881d1377645ffb87985808 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Tue, 6 Nov 2018 10:22:18 +0100 Subject: [PATCH] - Ethernet HAL Linux: limited interface name in Ethernet_getIntefaceMACAddress to prevent #83 --- hal/ethernet/linux/ethernet_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/ethernet/linux/ethernet_linux.c b/hal/ethernet/linux/ethernet_linux.c index 36dde5ce..43350f1a 100644 --- a/hal/ethernet/linux/ethernet_linux.c +++ b/hal/ethernet/linux/ethernet_linux.c @@ -155,7 +155,7 @@ Ethernet_getInterfaceMACAddress(const char* interfaceId, uint8_t* addr) memset(&buffer, 0x00, sizeof(buffer)); - strcpy(buffer.ifr_name, interfaceId); + strncpy(buffer.ifr_name, interfaceId, IFNAMSIZ); ioctl(sock, SIOCGIFHWADDR, &buffer);