diff options
author | Tom Gundersen <teg@jklm.no> | 2015-07-17 23:42:18 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-07-23 18:06:50 +0200 |
commit | 0e03ade57ea327cdefc34aaeb0a47c985b238120 (patch) | |
tree | 9e4461342f0a54ab5b72a0369daf6b39fce3e2c3 /src/resolve/resolved-dns-packet.c | |
parent | 8e6edc490c612d5c0f58a267b066e66a1ccaae2a (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/resolved-dns-packet.c')
-rw-r--r-- | src/resolve/resolved-dns-packet.c | 2 |
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; |