aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-11-21 22:46:22 +0100
committerMarvin Borner2020-11-21 22:46:22 +0100
commitc0decce503f945ac5883b811443ddca44a7525b9 (patch)
tree5cc12b16ae2eb182d692d89caeb2a20faf7f6b5c
parentac9759c082ceddd9818359eb33ccbbc6c7841676 (diff)
Fixed wrong DNS index
You can forget the previous commit. It was probably still better to clear the whole input field instead. (security/privacy)
-rw-r--r--libnet/dns.c2
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;
}