0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 10:08:56 +02:00

ircd::net::dns::resolver: Value-copy for ntoh() to avoid unaligned pointer to short.

This commit is contained in:
Jason Volk 2020-04-09 14:58:48 -07:00
parent 5fab181fa5
commit c2dfc5c0aa

View file

@ -564,10 +564,10 @@ try
*reinterpret_cast<rfc1035::header *>(data(buf))
};
ntoh(&header.qdcount);
ntoh(&header.ancount);
ntoh(&header.nscount);
ntoh(&header.arcount);
header.qdcount = ntoh(header.qdcount);
header.ancount = ntoh(header.ancount);
header.nscount = ntoh(header.nscount);
header.arcount = ntoh(header.arcount);
const const_buffer body
{