]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set maximum limit
authorAlan T. DeKok <aland@freeradius.org>
Thu, 7 Oct 2021 16:06:21 +0000 (12:06 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 7 Oct 2021 16:07:32 +0000 (12:07 -0400)
src/protocols/dns/decode.c

index 768c8a5e37bfe71baf43c0e291598afe3b03d75d..6cc86a909badf242932728f413c05f07724a795b 100644 (file)
@@ -573,6 +573,8 @@ static ssize_t fr_dns_decode_proto(TALLOC_CTX *ctx, fr_pair_list_t *list, uint8_
        fr_dcursor_t    cursor;
        fr_dns_ctx_t *packet_ctx = proto_ctx;
 
+       if (data_len > 65535) return -1; /* packet is too big */
+
        /*
         *      Allow queries or answers
         */