net/udp/udp_callback.c: Initialize address structure to avoid random values in padding.

This commit is contained in:
anchao
2019-03-19 09:49:54 -06:00
committed by Gregory Nutt
parent c9b73f5139
commit a418b63e07
+6 -2
View File
@@ -82,10 +82,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con
FAR struct iob_s *iob; FAR struct iob_s *iob;
int ret; int ret;
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
FAR struct sockaddr_in6 src_addr6; FAR struct sockaddr_in6 src_addr6 =
{
};
#endif #endif
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
FAR struct sockaddr_in src_addr4; FAR struct sockaddr_in src_addr4 =
{
};
#endif #endif
FAR void *src_addr; FAR void *src_addr;
uint8_t src_addr_size; uint8_t src_addr_size;