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:
+6
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user