]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add warning not about handling malformed option content
authorMark Andrews <marka@isc.org>
Tue, 7 Jul 2015 00:25:09 +0000 (10:25 +1000)
committerMark Andrews <marka@isc.org>
Tue, 7 Jul 2015 00:25:09 +0000 (10:25 +1000)
lib/dns/message.c

index ee15e9d4e59ab9a8bd11f67bfb14145e048efaad..b752da61b104c9065935cd85e4f365ea9b40130f 100644 (file)
@@ -3229,6 +3229,10 @@ render_ecs(isc_buffer_t *optbuf, isc_buffer_t *target) {
        isc_uint16_t family;
        isc_uint8_t addrlen, addrbytes, scopelen;
 
+       /*
+        * Note: This routine needs to handle malformed ECS options.
+        */
+
        if (isc_buffer_remaininglength(optbuf) < 4)
                return (DNS_R_OPTERR);
        family = isc_buffer_getuint16(optbuf);
@@ -3312,7 +3316,13 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
                if (result != ISC_R_SUCCESS)
                        return (ISC_R_SUCCESS);
 
-               /* Print EDNS info, if any */
+               /*
+                * Print EDNS info, if any.
+                *
+                * WARNING: The option contents may be malformed as
+                * dig +ednsopt=value:<content> does not validity
+                * checking.
+                */
                dns_rdata_init(&rdata);
                dns_rdataset_current(ps, &rdata);