From a5a30ae7c0636a57d8575acb98fdf906c0ea818f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 22 Dec 2011 07:41:29 +0000 Subject: [PATCH] 3253. [bug] Return DNS_R_SYNTAX when the input to a text field is too long. [RT #26956] --- CHANGES | 3 +++ lib/dns/rdata.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 77c1bf6de2..a8b82e3de5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3253. [bug] Return DNS_R_SYNTAX when the input to a text field is + too long. [RT #26956] + 3252. [bug] When master zones using inline-signing were updated while the server was offline, the source zone could fall out of sync with the signed diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index ac223bc013..f7c1f0e6f8 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.214 2011/11/02 01:01:52 marka Exp $ */ +/* $Id: rdata.c,v 1.215 2011/12/22 07:41:29 marka Exp $ */ /*! \file */ @@ -1138,7 +1138,8 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) { } escape = ISC_FALSE; if (nrem == 0) - return (ISC_R_NOSPACE); + return ((tregion.length <= 256U) ? + ISC_R_NOSPACE : DNS_R_SYNTAX); *t++ = c; nrem--; }