From d0598c490e53ea151ade13d7a487c841d2def02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 30 May 2017 09:07:03 +0300 Subject: [PATCH] Ethernet: Fix out of bounds memset on reset DHCP lease --- libraries/Ethernet/src/Dhcp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Ethernet/src/Dhcp.cpp b/libraries/Ethernet/src/Dhcp.cpp index 3702d73b64d..99aa9c0c856 100644 --- a/libraries/Ethernet/src/Dhcp.cpp +++ b/libraries/Ethernet/src/Dhcp.cpp @@ -28,7 +28,7 @@ int DhcpClass::beginWithDHCP(uint8_t *mac, unsigned long timeout, unsigned long void DhcpClass::reset_DHCP_lease(){ // zero out _dhcpSubnetMask, _dhcpGatewayIp, _dhcpLocalIp, _dhcpDhcpServerIp, _dhcpDnsServerIp - memset(_dhcpLocalIp, 0, 20); + memset(_dhcpLocalIp, 0, 4); } //return:0 on error, 1 if request is sent and response is received