X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fpong.c;h=43fd718027c1314bb8909b3f813cbabf30553905;hb=87f96aec8c48327d879c20ff2b789c88a675173d;hp=e0d8b0957904162cca43f5de47fd364cd49788de;hpb=f6e87ab476a0faf8b124ecaaa27f967d825e6457;p=tinc diff --git a/test/pong.c b/test/pong.c index e0d8b095..43fd7180 100644 --- a/test/pong.c +++ b/test/pong.c @@ -72,7 +72,7 @@ static ssize_t do_ipv4(uint8_t *buf, ssize_t len, struct sockaddr_in *in) { return 0; } - memcpy(&icmp, buf + 14 + sizeof(ip), sizeof icmp); + memcpy(&icmp, buf + 14 + sizeof(ip), sizeof(icmp)); if(icmp.icmp_type != ICMP_ECHO) { return 0; @@ -88,7 +88,7 @@ static ssize_t do_ipv4(uint8_t *buf, ssize_t len, struct sockaddr_in *in) { icmp.icmp_type = ICMP_ECHOREPLY; memcpy(buf + 14, &ip, sizeof(ip)); - memcpy(buf + 14 + sizeof(ip), &icmp, sizeof icmp); + memcpy(buf + 14 + sizeof(ip), &icmp, sizeof(icmp)); return len; }