Skip to content

Commit 300c3ab

Browse files
aabadiemiri64
andcommitted
tests/lwip_sock_udp: fix sizeof address param in mempcy
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
1 parent e66283f commit 300c3ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/lwip_sock_udp/stack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void _net_init(void)
176176
ip6_addr_t local6;
177177
s8_t idx;
178178

179-
memcpy(&local6.addr, local6_a, sizeof(local6));
179+
memcpy(&local6.addr, local6_a, sizeof(local6.addr));
180180
ip6_addr_clear_zone(&local6);
181181
netif_add_ip6_address(&netif, &local6, &idx);
182182
for (int i = 0; i <= idx; i++) {
@@ -213,7 +213,7 @@ void _prepare_send_checks(void)
213213
struct nd6_neighbor_cache_entry *nc = &neighbor_cache[i];
214214
if (nc->state == ND6_NO_ENTRY) {
215215
nc->state = ND6_REACHABLE;
216-
memcpy(&nc->next_hop_address, remote6, sizeof(ip6_addr_t));
216+
memcpy(&nc->next_hop_address.addr, remote6, sizeof(nc->next_hop_address.addr));
217217
ip6_addr_assign_zone(&nc->next_hop_address,
218218
IP6_UNICAST, &netif);
219219
memcpy(&nc->lladdr, mac, 6);

0 commit comments

Comments
 (0)