From 300c3abf2bf1a495cf8e358908b4fddfacb17455 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 18 Oct 2019 19:57:55 +0200 Subject: [PATCH] tests/lwip_sock_udp: fix sizeof address param in mempcy Co-authored-by: Martine Lenders --- tests/lwip_sock_udp/stack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lwip_sock_udp/stack.c b/tests/lwip_sock_udp/stack.c index 36f0b9bbd948..0233043badbb 100644 --- a/tests/lwip_sock_udp/stack.c +++ b/tests/lwip_sock_udp/stack.c @@ -176,7 +176,7 @@ void _net_init(void) ip6_addr_t local6; s8_t idx; - memcpy(&local6.addr, local6_a, sizeof(local6)); + memcpy(&local6.addr, local6_a, sizeof(local6.addr)); ip6_addr_clear_zone(&local6); netif_add_ip6_address(&netif, &local6, &idx); for (int i = 0; i <= idx; i++) { @@ -213,7 +213,7 @@ void _prepare_send_checks(void) struct nd6_neighbor_cache_entry *nc = &neighbor_cache[i]; if (nc->state == ND6_NO_ENTRY) { nc->state = ND6_REACHABLE; - memcpy(&nc->next_hop_address, remote6, sizeof(ip6_addr_t)); + memcpy(&nc->next_hop_address.addr, remote6, sizeof(nc->next_hop_address.addr)); ip6_addr_assign_zone(&nc->next_hop_address, IP6_UNICAST, &netif); memcpy(&nc->lladdr, mac, 6);