]> 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:56:27 +0000 (23:56 +0000)
committerEvan Hunt <each@isc.org>
Wed, 29 Jul 2009 23:56:27 +0000 (23:56 +0000)
improperly formatted key files.  [RT #20015]

CHANGES
lib/dns/dst_api.c

diff --git a/CHANGES b/CHANGES
index b07c529138090e6bb9edb55dd80dc064917cf3e3..1eaa45ba7cf7b32992ebb1493419bf4a6610431c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2642.  [bug]           nsupdate could dump core on solaris when reading
+                       improperly formatted key files.  [RT #20015]
+
 2640.  [security]      A specially crafted update packet will cause named
                        to exit. [RT #20000]
                        [RT #19959]
index 650102d81c03f2c8bf7a5a0ea027d77ee8c5480a..022caeba12df9e99cdcce62cdec31eaa742db785 100644 (file)
@@ -18,7 +18,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.1.6.12 2009/03/02 23:45:58 tbox Exp $
+ * $Id: dst_api.c,v 1.1.6.13 2009/07/29 23:56:27 each Exp $
  */
 
 /*! \file */
@@ -945,6 +945,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)