mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 13:42:06 -04:00
2883. [bug] 'dig +short' failed to handle really large datasets.
[RT #21113]
This commit is contained in:
parent
74cfabb955
commit
108300f7f1
2 changed files with 8 additions and 5 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
2883. [bug] 'dig +short' failed to handle really large datasets.
|
||||
[RT #21113]
|
||||
|
||||
2882. [bug] Remove memory context from list of active contexts
|
||||
before clearing 'magic'. [RT #21274]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.235 2010/03/04 23:50:34 tbox Exp $ */
|
||||
/* $Id: dig.c,v 1.236 2010/05/12 01:31:37 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -311,6 +311,8 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
|||
ADD_STRING(buf, " ");
|
||||
}
|
||||
result = dns_rdata_totext(rdata, NULL, buf);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (result);
|
||||
check_result(result, "dns_rdata_totext");
|
||||
if (query->lookup->identify) {
|
||||
TIME_NOW(&now);
|
||||
|
|
@ -333,10 +335,8 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
|||
{
|
||||
dns_name_t *name;
|
||||
dns_rdataset_t *rdataset;
|
||||
isc_buffer_t target;
|
||||
isc_result_t result, loopresult;
|
||||
dns_name_t empty_name;
|
||||
char t[4096];
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
|
||||
UNUSED(flags);
|
||||
|
|
@ -352,8 +352,6 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
|||
name = NULL;
|
||||
dns_message_currentname(msg, DNS_SECTION_ANSWER, &name);
|
||||
|
||||
isc_buffer_init(&target, t, sizeof(t));
|
||||
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
|
|
@ -362,6 +360,8 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
|||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = say_message(&rdata, query,
|
||||
buf);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (result);
|
||||
check_result(result, "say_message");
|
||||
loopresult = dns_rdataset_next(rdataset);
|
||||
dns_rdata_reset(&rdata);
|
||||
|
|
|
|||
Loading…
Reference in a new issue