summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-17 23:42:18 +0200
committerTom Gundersen <teg@jklm.no>2015-07-23 18:06:50 +0200
commit0e03ade57ea327cdefc34aaeb0a47c985b238120 (patch)
tree9e4461342f0a54ab5b72a0369daf6b39fce3e2c3 /src/resolve
parent8e6edc490c612d5c0f58a267b066e66a1ccaae2a (diff)
resolved: packet - fix segfault in truncate()
A size_t was being accessed as a char* due to the order of arguments being inverted.
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 2dd1f564fa..649e8b74e1 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -275,7 +275,7 @@ static void dns_packet_truncate(DnsPacket *p, size_t sz) {
if (p->size <= sz)
return;
- HASHMAP_FOREACH_KEY(s, n, p->names, i) {
+ HASHMAP_FOREACH_KEY(n, s, p->names, i) {
if (PTR_TO_SIZE(n) < sz)
continue;