From: Andreas Gustafsson Date: Sat, 15 Sep 2001 00:39:46 +0000 (+0000) Subject: pull up part of 997.: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef80060faf159b31a105b2f90402adf8924f36b0;p=thirdparty%2Fbind9.git pull up part of 997.: ISC_R_SUCCESS could be returned on failure --- diff --git a/lib/dns/sec/dst/dst_parse.c b/lib/dns/sec/dst/dst_parse.c index d22935d9447..fcdc557d6df 100644 --- a/lib/dns/sec/dst/dst_parse.c +++ b/lib/dns/sec/dst/dst_parse.c @@ -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 @@ -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);