diff options
Diffstat (limited to 'libnet/dns.c')
-rw-r--r-- | libnet/dns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnet/dns.c b/libnet/dns.c index dc1a5f0..5fe9411 100644 --- a/libnet/dns.c +++ b/libnet/dns.c @@ -68,7 +68,7 @@ static void dns_make_packet(struct dns_packet *packet, const char *name) u32 cnt = 0; for (u32 i = 0; i < part_count(name) * 2; i += 2) { data[cnt] = part_len(name, i / 2); - memcpy(&data[cnt + 1], &name[cnt], data[i]); + memcpy(&data[cnt + 1], &name[cnt], data[cnt]); cnt += data[cnt] + 1; } |