]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1350. [bug] dns_name_fromtext() failed to handle too many labels
authorMark Andrews <marka@isc.org>
Fri, 2 Aug 2002 00:25:15 +0000 (00:25 +0000)
committerMark Andrews <marka@isc.org>
Fri, 2 Aug 2002 00:25:15 +0000 (00:25 +0000)
                        gracefully.

CHANGES
lib/dns/name.c

diff --git a/CHANGES b/CHANGES
index a5b06f61d388e22d50699851f0eb610068e7a952..92779f3eff2768b9839a544fbdcdbe07d385d2e4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1350.  [bug]           dns_name_fromtext() failed to handle too many labels
+                       gracefully.
+
 1349.  [security]      Mimimum OpenSSL version now 0.9.6e (was 0.9.5a).
                        http://www.cert.org/advisories/CA-2002-23.html
 
index e489fa48d80d2a9738fa19984a3cdd27bd3db9a1..3a2d776c78afbca0f201fedebada7357576c50df 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.c,v 1.135 2002/05/29 00:27:53 marka Exp $ */
+/* $Id: name.c,v 1.136 2002/08/02 00:25:15 marka Exp $ */
 
 #include <config.h>
 
@@ -1239,6 +1239,8 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                        }
                        kind = ft_ordinary;
                        state = ft_ordinary;
+                       if (nrem == 0)
+                               return (ISC_R_NOSPACE);
                        /* FALLTHROUGH */
                case ft_ordinary:
                        if (c == '.') {