]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2642. [bug] nsupdate could dump core on solaris when reading
authorEvan Hunt <each@isc.org>
Wed, 29 Jul 2009 23:45:24 +0000 (23:45 +0000)
committerEvan Hunt <each@isc.org>
Wed, 29 Jul 2009 23:45:24 +0000 (23:45 +0000)
improperly formatted key files.  [RT #20015]

CHANGES
lib/dns/dst_api.c

diff --git a/CHANGES b/CHANGES
index d9852e1dd278a3b62071e0a3ace1aa7b8fd1128e..04bb7d7718e73889ed5ec46695d8d0c0b985ff51 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
        --- 9.7.0a2 released ---
 
+2642.  [bug]           nsupdate could dump core on solaris when reading
+                       improperly formatted key files.  [RT #20015]
+
 2641.  [bug]           Fixed an error in parsing update-policy syntax,
                        added a regression test to check it. [RT #20007]
 
index 31b088067354c6f6ff245e6c849ea3d145640482..00221e05524007985a42382873c7ada6a9abec2e 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.24 2009/07/19 23:47:55 tbox Exp $
+ * $Id: dst_api.c,v 1.25 2009/07/29 23:45:24 each Exp $
  */
 
 /*! \file */
@@ -1052,6 +1052,9 @@ dst_key_read_public(const char *filename, int type,
        /* Read the next word: either TTL, class, or 'KEY' */
        NEXTTOKEN(lex, opt, &token);
 
+       if (token.type != isc_tokentype_string)
+               BADTOKEN();
+
        /* If it's a TTL, read the next one */
        result = dns_ttl_fromtext(&token.value.as_textregion, &ttl);
        if (result == ISC_R_SUCCESS)