]> 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:45:46 +0000 (07:45 +0000)
committerMark Andrews <marka@isc.org>
Thu, 22 Dec 2011 07:45:46 +0000 (07:45 +0000)
                        too long. [RT #26956]

CHANGES
lib/dns/rdata.c

diff --git a/CHANGES b/CHANGES
index cecc6013b3b33dc500a81be372ae310c2a9ad952..ba705af22b753d2858857ab45b6f627cc621520a 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]
+
 3251.  [bug]           Enforce a upper bound (65535 bytes) on the amount of
                        memory dns_sdlz_putrr() can allocate per record to
                        prevent run away memory consumption on ISC_R_NOSPACE.
index d0306bc53645f13b0633bc3b4dd3404ff8443018..7d994a6953d4329aece932bfe43798135c441f1e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdata.c,v 1.199.50.7 2011/11/02 01:16:26 marka Exp $ */
+/* $Id: rdata.c,v 1.199.50.8 2011/12/22 07:45:46 marka Exp $ */
 
 /*! \file */
 
@@ -1108,7 +1108,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--;
        }