1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Fix looking up TXT records using the dns module.

This commit is contained in:
Sadie Powell
2025-09-06 17:02:02 +01:00
parent 7dfb40cb58
commit 4021c0bb68
+6 -2
View File
@@ -197,8 +197,12 @@ class Packet final
if (pos + rdlength > input_size)
throw SocketException("Unable to unpack TXT resource record");
record.rdata = std::string(reinterpret_cast<const char* >(input + pos), rdlength);
pos += rdlength;
auto txtlength = input[pos++];
if (pos + txtlength > input_size)
throw SocketException("Unable to unpack TXT resource record");
record.rdata = Anope::string(reinterpret_cast<const char* >(input + pos), txtlength);
pos += rdlength - 1;
break;
}
case DNS::QUERY_SRV: