From: Ralf Wildenhues Date: Sat, 1 Sep 2007 08:13:20 +0000 (+0000) Subject: * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test X-Git-Tag: release-2-1b~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dbd9894703e37fc0c6fbaeb0094a16a767e7f3d;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test array address of sys_dlsearch_path against NULL, rather test for nonempty contents. Coverity reports CID 148 and CID 149 via Jeff Squyres. --- diff --git a/ChangeLog b/ChangeLog index 5e986b746..052ce9f9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-09-01 Ralf Wildenhues + * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test + array address of sys_dlsearch_path against NULL, rather test for + nonempty contents. + Coverity reports CID 148 and CID 149 via Jeff Squyres. + * libltdl/ltdl.c (tryall_dlopen_module): Fix string length computation: do not allocate more than needed. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index dc07761ec..5a2799784 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1311,7 +1311,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, } #endif #if defined(LT_DLSEARCH_PATH) - if (!file && sys_dlsearch_path) + if (!file && *sys_dlsearch_path) { file = find_file (sys_dlsearch_path, base_name, &dir); } @@ -1849,7 +1849,7 @@ lt_dlforeachfile (const char *search_path, } #endif #if defined(LT_DLSEARCH_PATH) - if (!is_done && sys_dlsearch_path) + if (!is_done && *sys_dlsearch_path) { is_done = foreach_dirinpath (sys_dlsearch_path, 0, foreachfile_callback, fpptr, data);