From: Andreas Gustafsson Date: Sat, 15 Sep 2001 00:37:18 +0000 (+0000) Subject: pull up part of 997.: X-Git-Tag: v9.2.0rc4~24 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b2eeaf650057cd74493382688dc329f1724c7c1a;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 02568268811..690d49967cf 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.31 2001/05/31 00:38:07 bwelling Exp $ + * $Id: dst_parse.c,v 1.31.2.1 2001/09/15 00:37:18 gson Exp $ */ #include @@ -306,8 +306,10 @@ dst__privstruct_parsefile(dst_key_t *key, const char *filename, 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);