]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3253. [bug] Return DNS_R_SYNTAX when the input to a text field is
authorMark Andrews <marka@isc.org>
Thu, 22 Dec 2011 07:41:29 +0000 (07:41 +0000)
committerMark Andrews <marka@isc.org>
Thu, 22 Dec 2011 07:41:29 +0000 (07:41 +0000)
                        too long. [RT #26956]

CHANGES
lib/dns/rdata.c

diff --git a/CHANGES b/CHANGES
index 77c1bf6de26b1ba131667a50ba8cd0b81065019e..a8b82e3de5b28ff0b9928a9413e6afa2034de891 100644 (file)
--- 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
index ac223bc0135b65f4fdb2935089112344dc16f259..f7c1f0e6f8ce0d630e83f2335c0e94b5983a2647 100644 (file)
@@ -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--;
        }