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:
parent
8e6edc490c
commit
0e03ade57e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user