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

CHANGES
lib/dns/dst_api.c

diff --git a/CHANGES b/CHANGES
index bf9226bd100bbcd54ee1e561c3cf0c111f8fad7a..d8326837848869eb7ef8df5fd0abb2d8b785013b 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]
 
index 9b743f17da57b1d96adb32e9ec083cef663c64da..31bac793613c230214a0f26fd8eb4b563ed5c9af 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.11.92.6 2009/03/02 02:34:12 marka Exp $
+ * $Id: dst_api.c,v 1.11.92.7 2009/07/29 23:55:00 each Exp $
  */
 
 /*! \file */
@@ -967,6 +967,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)