From: Mark Andrews Date: Wed, 12 Mar 2014 01:58:09 +0000 (+1100) Subject: check isc_hex_totext result X-Git-Tag: v9.10.0b2~25 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f5375b1b8e0fbb5ab379ed05ff8f451d664d5804;p=thirdparty%2Fbind9.git check isc_hex_totext result --- diff --git a/bin/named/server.c b/bin/named/server.c index 32aeb770bad..16125a1ff36 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -9275,6 +9275,7 @@ generate_salt(unsigned char *salt, size_t saltlen) { unsigned char text[512 + 1]; isc_region_t r; isc_buffer_t buf; + isc_result_t result; if (saltlen > 256) return (ISC_R_RANGE); @@ -9289,7 +9290,8 @@ generate_salt(unsigned char *salt, size_t saltlen) { r.length = saltlen; isc_buffer_init(&buf, text, sizeof(text)); - isc_hex_totext(&r, 2, "", &buf); + result = isc_hex_totext(&r, 2, "", &buf); + RUNTIME_CHECK(result == ISC_R_SUCCESS); text[saltlen * 2] = 0; isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,