2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 06:55:30 +00:00

[master] wrong dlopen filename caused segfault

3878.	[bug]		Using the incorrect filename for a DLZ module
			caused a segmentation fault on startup. [RT #36286]
This commit is contained in:
Evan Hunt
2014-06-12 19:33:37 -07:00
parent 1881aea774
commit c1d33c159b
3 changed files with 11 additions and 1 deletions

View File

@@ -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 3877. [bug] Inserting and deleting parent and child nodes
in response policy zones could trigger an assertion in response policy zones could trigger an assertion
failure. [RT #36272] failure. [RT #36272]

View 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]); cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
if (cd->dl_path == NULL) { if (cd->dl_path == NULL) {
result = ISC_R_NOMEMORY;
goto failed; goto failed;
} }
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname); cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
if (cd->dlzname == NULL) { if (cd->dlzname == NULL) {
result = ISC_R_NOMEMORY;
goto failed; goto failed;
} }
@@ -279,6 +281,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
dlopen_log(ISC_LOG_ERROR, dlopen_log(ISC_LOG_ERROR,
"dlz_dlopen failed to open library '%s' - %s", "dlz_dlopen failed to open library '%s' - %s",
cd->dl_path, dlerror()); cd->dl_path, dlerror());
result = ISC_R_FAILURE;
goto failed; goto failed;
} }
@@ -298,6 +301,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
cd->dlz_findzonedb == NULL) cd->dlz_findzonedb == NULL)
{ {
/* We're missing a required symbol */ /* We're missing a required symbol */
result = ISC_R_FAILURE;
goto failed; goto failed;
} }
@@ -379,7 +383,6 @@ failed:
return (result); return (result);
} }
/* /*
* Called when bind is shutting down * Called when bind is shutting down
*/ */

View 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]); cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
if (cd->dl_path == NULL) { if (cd->dl_path == NULL) {
result = ISC_R_NOMEMORY;
goto failed; goto failed;
} }
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname); cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
if (cd->dlzname == NULL) { if (cd->dlzname == NULL) {
result = ISC_R_NOMEMORY;
goto failed; goto failed;
} }
@@ -265,6 +267,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
dlopen_log(ISC_LOG_ERROR, dlopen_log(ISC_LOG_ERROR,
"dlz_dlopen failed to open library '%s' - %u", "dlz_dlopen failed to open library '%s' - %u",
cd->dl_path, error); cd->dl_path, error);
result = ISC_R_FAILURE;
goto failed; goto failed;
} }
@@ -284,6 +287,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
cd->dlz_findzonedb == NULL) cd->dlz_findzonedb == NULL)
{ {
/* We're missing a required symbol */ /* We're missing a required symbol */
result = ISC_R_FAILURE;
goto failed; goto failed;
} }