]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pull up part of 997.:
authorAndreas Gustafsson <source@isc.org>
Sat, 15 Sep 2001 00:39:46 +0000 (00:39 +0000)
committerAndreas Gustafsson <source@isc.org>
Sat, 15 Sep 2001 00:39:46 +0000 (00:39 +0000)
ISC_R_SUCCESS could be returned on failure

lib/dns/sec/dst/dst_parse.c

index d22935d9447d26b137b1a7bb4e213fa6604927cb..fcdc557d6df6e7f037075a94094dad28b67e38fb 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_parse.c,v 1.26.4.1 2001/01/09 22:48:21 bwelling Exp $
+ * $Id: dst_parse.c,v 1.26.4.2 2001/09/15 00:39:46 gson Exp $
  */
 
 #include <config.h>
@@ -312,8 +312,10 @@ dst__privstruct_parsefile(dst_key_t *key, const isc_uint16_t id,
 
                memset(&priv->elements[n], 0, sizeof(dst_private_element_t));
                tag = find_value(token.value.as_pointer, dst_key_alg(key));
-               if (tag < 0 || TAG_ALG(tag) != dst_key_alg(key))
+               if (tag < 0 || TAG_ALG(tag) != dst_key_alg(key)) {
+                       ret = DST_R_INVALIDPRIVATEKEY;
                        goto fail;
+               }
                priv->elements[n].tag = tag;
 
                data = (unsigned char *) isc_mem_get(mctx, MAXFIELDSIZE);