diff --git a/CHANGES b/CHANGES index 75695e89a9..91de62058a 100644 --- 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. diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index fc38bb5306..21aa7f076c 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -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 */ diff --git a/bin/named/win32/dlz_dlopen_driver.c b/bin/named/win32/dlz_dlopen_driver.c index d655bd1e13..550769dc19 100644 --- a/bin/named/win32/dlz_dlopen_driver.c +++ b/bin/named/win32/dlz_dlopen_driver.c @@ -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; }