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

CHANGES
lib/dns/dst_api.c

diff --git a/CHANGES b/CHANGES
index 65ae7de68266124b0032f4e62ae50d802095c898..ad184b8826914acf3d2de124b4b69b28a054a422 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 144c685e10897f9c358c2b14fc4cda02cc725cd2..957ac98a488ab4fd4ba708e3215755fe8602ec38 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.16.12.3 2009/03/02 02:00:34 marka Exp $
+ * $Id: dst_api.c,v 1.16.12.4 2009/07/29 23:53:22 each Exp $
  */
 
 /*! \file */
@@ -1017,6 +1017,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)