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

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

diff --git a/CHANGES b/CHANGES
index b282c74c603582c5b8b058478b868af23eca9fea..a0a0281f2d43ccff6236902e1606168d1d0949c9 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]
+
 3877.  [bug]           Inserting and deleting parent and child nodes
                        in response policy zones could trigger an assertion
                        failure. [RT #36272]
index 28cc3ef8953c01bbec8a141c89cfb63e5daf6890..378327245fb9a19542963e99c29c89745d2278a3 100644 (file)
@@ -245,11 +245,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;
        }
 
@@ -279,6 +281,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;
        }
 
@@ -298,6 +301,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;
        }
 
@@ -379,7 +383,6 @@ failed:
        return (result);
 }
 
-
 /*
  * Called when bind is shutting down
  */
index b6ba3a397cb492523a1cb0000e7b049689fd96ea..a12e9166612885cf6bbf2872f812a5a1c47cb102 100644 (file)
@@ -244,11 +244,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;
        }
 
@@ -265,6 +267,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;
        }
 
@@ -284,6 +287,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;
        }