]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] wrong dlopen filename caused segfault
authorEvan Hunt <each@isc.org>
Fri, 13 Jun 2014 02:34:29 +0000 (19:34 -0700)
committerEvan Hunt <each@isc.org>
Fri, 13 Jun 2014 02:34:29 +0000 (19:34 -0700)
3878. [bug] Using the incorrect filename for a DLZ module
caused a segmentation fault on startup. [RT #36286]

(cherry picked from commit c1d33c159bf81d6faf9948ac9a6f307ca52284af)
(cherry picked from commit b04088636a108d85f9ec910e4700632caa1d5fad)

CHANGES
bin/named/unix/dlz_dlopen_driver.c
bin/named/win32/dlz_dlopen_driver.c

diff --git a/CHANGES b/CHANGES
index 75695e89a953168b9e648dfe7a250d09beac69b6..91de62058ad33f2a9869bbefd6afaeba300a11f4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3878.  [bug]           Using the incorrect filename for a DLZ module
+                       caused a segmentation fault on startup. [RT #36286]
+
 3874.  [test]          Check that only "check-names master" is needed for
                        updates to be accepted.
 
index fc38bb5306c3d1d078c00ea0277974167d8f760d..21aa7f076c61f61d2ae75468272b1c09e1ca2ac7 100644 (file)
@@ -240,11 +240,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
 
        cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
        if (cd->dl_path == NULL) {
+               result = ISC_R_NOMEMORY;
                goto failed;
        }
 
        cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
        if (cd->dlzname == NULL) {
+               result = ISC_R_NOMEMORY;
                goto failed;
        }
 
@@ -274,6 +276,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
                dlopen_log(ISC_LOG_ERROR,
                           "dlz_dlopen failed to open library '%s' - %s",
                           cd->dl_path, dlerror());
+               result = ISC_R_FAILURE;
                goto failed;
        }
 
@@ -292,6 +295,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
            cd->dlz_findzonedb == NULL)
        {
                /* We're missing a required symbol */
+               result = ISC_R_FAILURE;
                goto failed;
        }
 
@@ -371,7 +375,6 @@ failed:
        return (result);
 }
 
-
 /*
  * Called when bind is shutting down
  */
index d655bd1e13a22ac10009ca2670406a3969b3aba1..550769dc196ee6512dc82cd0bf860308c6348189 100644 (file)
@@ -239,11 +239,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
 
        cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
        if (cd->dl_path == NULL) {
+               result = ISC_R_NOMEMORY;
                goto failed;
        }
 
        cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
        if (cd->dlzname == NULL) {
+               result = ISC_R_NOMEMORY;
                goto failed;
        }
 
@@ -260,6 +262,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
                dlopen_log(ISC_LOG_ERROR,
                           "dlz_dlopen failed to open library '%s' - %u",
                           cd->dl_path, error);
+               result = ISC_R_FAILURE;
                goto failed;
        }
 
@@ -278,6 +281,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
            cd->dlz_findzonedb == NULL)
        {
                /* We're missing a required symbol */
+               result = ISC_R_FAILURE;
                goto failed;
        }