]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check isc_hex_totext result
authorMark Andrews <marka@isc.org>
Wed, 12 Mar 2014 01:58:09 +0000 (12:58 +1100)
committerMark Andrews <marka@isc.org>
Wed, 12 Mar 2014 01:58:09 +0000 (12:58 +1100)
bin/named/server.c

index 32aeb770badd474d85307cf140a80a88acad503e..16125a1ff360312671763bc7af72f2490e6b9973 100644 (file)
@@ -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,