mirror of
https://github.com/systemd/systemd.git
synced 2024-11-12 15:21:19 +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)
|
if (p->size <= sz)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HASHMAP_FOREACH_KEY(s, n, p->names, i) {
|
HASHMAP_FOREACH_KEY(n, s, p->names, i) {
|
||||||
|
|
||||||
if (PTR_TO_SIZE(n) < sz)
|
if (PTR_TO_SIZE(n) < sz)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user