From 853416f54a8bc4b7277717fcdecbc511d69a1297 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 4 Mar 2014 09:00:35 -0800 Subject: [PATCH] [v9_8] 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) (cherry picked from commit 82faa427b59de39bb117e576d44dd6ed4eb9a458) --- 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 c85f25e1be..273fcdbbf0 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 98dfc5a75b..6d2c2a59a0 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -327,6 +327,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 52292b5b31..6e29bbc561 100644 --- a/bin/named/win32/dlz_dlopen_driver.c +++ b/bin/named/win32/dlz_dlopen_driver.c @@ -311,6 +311,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; }