Merge branch '4433-supplied-buffer-too-large-in-wire_test-c-bind-9.18' into 'bind-9.18'

[9.18] Resolve "Supplied Buffer Too Large in wire_test.c"

See merge request isc-projects/bind9!8497
This commit is contained in:
Mark Andrews
2023-11-16 02:01:21 +00:00
5 changed files with 5 additions and 4 deletions

View File

@@ -287,7 +287,7 @@ process_message(isc_buffer_t *source) {
}
if (dorender) {
unsigned char b2[64 * 1024];
unsigned char b2[65535];
isc_buffer_t buffer;
dns_compress_t cctx;

View File

@@ -597,7 +597,7 @@ dns_message_renderbegin(dns_message_t *msg, dns_compress_t *cctx,
*
*\li 'cctx' be valid.
*
*\li 'buffer' is a valid buffer.
*\li 'buffer' is a valid buffer with length less than 65536.
*
* Side Effects:
*

View File

@@ -1774,6 +1774,7 @@ dns_message_renderbegin(dns_message_t *msg, dns_compress_t *cctx,
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(buffer != NULL);
REQUIRE(isc_buffer_length(buffer) < 65536);
REQUIRE(msg->buffer == NULL);
REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTRENDER);

View File

@@ -1264,7 +1264,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
* Note that although 65535-byte RRs are allowed in principle, they
* cannot be zone-transferred (at least not if uncompressible),
* because the message and RR headers would push the size of the
* TCP message over the 65536 byte limit.
* TCP message over the 65535 byte limit.
*/
mem = isc_mem_get(mctx, len);
isc_buffer_init(&xfr->buf, mem, len);

View File

@@ -290,7 +290,7 @@ attach_query_msg_to_client(ns_client_t *client, const char *qnamestr,
dns_rdatatype_t qtype, unsigned int qflags) {
dns_rdataset_t *qrdataset = NULL;
dns_message_t *message = NULL;
unsigned char query[65536];
unsigned char query[65535];
dns_name_t *qname = NULL;
isc_buffer_t querybuf;
dns_compress_t cctx;