summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@sigterm.info>2021-05-04 17:34:58 -0400
committerAdam <Adam@sigterm.info>2021-05-04 17:53:57 -0400
commit030eaf9e574d0045265d11638e8cced4861423a7 (patch)
tree0184076106f4eb603e9672a0157a12080e08454e
parentde648cb16dadb5274786b48a061e929ab2f67aa0 (diff)
core_dns: skip unknown resource record types
-rw-r--r--src/coremods/core_dns.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index b16658242..40de989b6 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -211,7 +211,13 @@ class Packet : public Query
break;
}
default:
+ {
+ if (pos + rdlength > input_size)
+ throw Exception("Unable to skip resource record");
+
+ pos += rdlength;
break;
+ }
}
if (!record.name.empty() && !record.rdata.empty())