From: Mark Andrews Date: Mon, 13 Oct 2014 12:41:36 +0000 (+1100) Subject: 3974. [bug] handle DH_compute_key() failure correctly in X-Git-Tag: v9.11.0a1~1360^2~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=58a1051e92d46638306e2c17806307c04065c2b3;p=thirdparty%2Fbind9.git 3974. [bug] handle DH_compute_key() failure correctly in openssldh_link.c. [RT #37477] --- diff --git a/CHANGES b/CHANGES index aed11c82751..57cab98885e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3974. [bug] handle DH_compute_key() failure correctly in + openssldh_link.c. [RT #37477] + 3973. [func] Added hooks for Google/Great Performance Tools CPU Profiler, including in real time. [RT #37339] diff --git a/lib/dns/openssldh_link.c b/lib/dns/openssldh_link.c index 6c3f555f8dc..2056394e03c 100644 --- a/lib/dns/openssldh_link.c +++ b/lib/dns/openssldh_link.c @@ -93,7 +93,7 @@ openssldh_computesecret(const dst_key_t *pub, const dst_key_t *priv, if (r.length < len) return (ISC_R_NOSPACE); ret = DH_compute_key(r.base, dhpub->pub_key, dhpriv); - if (ret == 0) + if (ret <= 0) return (dst__openssl_toresult2("DH_compute_key", DST_R_COMPUTESECRETFAILURE)); isc_buffer_add(secret, len);