1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00

resolved: packet - fix segfault in truncate()

A size_t was being accessed as a char* due to the order of arguments being inverted.
This commit is contained in:
Tom Gundersen 2015-07-17 23:42:18 +02:00
parent 8e6edc490c
commit 0e03ade57e

View File

@ -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;