From: Mark Andrews Date: Tue, 7 Jul 2015 00:25:09 +0000 (+1000) Subject: add warning not about handling malformed option content X-Git-Tag: v9.11.0a1~681 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bd08b82891ea6abb339d06d86734df7f4febf533;p=thirdparty%2Fbind9.git add warning not about handling malformed option content --- diff --git a/lib/dns/message.c b/lib/dns/message.c index ee15e9d4e59..b752da61b10 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -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: does not validity + * checking. + */ dns_rdata_init(&rdata); dns_rdataset_current(ps, &rdata);