diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c index 2bb83f3449e..1c9bf88bada 100644 --- a/net/icmp/icmp_input.c +++ b/net/icmp/icmp_input.c @@ -128,6 +128,7 @@ static uint16_t icmp_datahandler(FAR struct net_driver_s *dev, net_ipv4addr_copy(inaddr.sin_addr.s_addr, net_ip4addr_conv32(ipv4->srcipaddr)); + memset(inaddr.sin_zero, 0, sizeof(inaddr.sin_zero)); /* Copy the src address info into the I/O buffer chain. We will not wait * for an I/O buffer to become available in this context. It there is