From 82faa427b59de39bb117e576d44dd6ed4eb9a458 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 4 Mar 2014 09:00:24 -0800 Subject: [PATCH] [v9_9] fix API mismatch bug in DLZ 3775. [bug] dlz_dlopen driver could return the wrong error code on API version mismatch, leading to a segfault. [RT #35495] (cherry picked from commit d51456e4537729c2263303350abeff45379b1105) --- CHANGES | 4 ++++ bin/named/unix/dlz_dlopen_driver.c | 1 + bin/named/win32/dlz_dlopen_driver.c | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 693fe1c51b..1109e15966 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +3775. [bug] dlz_dlopen driver could return the wrong error + code on API version mismatch, leading to a segfault. + [RT #35495] + 3773. [func] "host", "nslookup" and "nsupdate" now have options to print the version number and exit. [RT #26057] diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index 2ba8a028a3..62b6614a4f 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -330,6 +330,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], "dlz_dlopen: incorrect version %d " "should be %d in '%s'", cd->version, DLZ_DLOPEN_VERSION, cd->dl_path); + result = ISC_R_FAILURE; goto failed; } diff --git a/bin/named/win32/dlz_dlopen_driver.c b/bin/named/win32/dlz_dlopen_driver.c index 0c192b4769..62008c0dde 100644 --- a/bin/named/win32/dlz_dlopen_driver.c +++ b/bin/named/win32/dlz_dlopen_driver.c @@ -314,6 +314,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], "dlz_dlopen: incorrect version %d " "should be %d in '%s'", cd->version, DLZ_DLOPEN_VERSION, cd->dl_path); + result = ISC_R_FAILURE; goto failed; }