]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 1 Sep 2007 08:13:20 +0000 (08:13 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 1 Sep 2007 08:13:20 +0000 (08:13 +0000)
array address of sys_dlsearch_path against NULL, rather test for
nonempty contents.
Coverity reports CID 148 and CID 149 via Jeff Squyres.

ChangeLog
libltdl/ltdl.c

index 5e986b746fe8475ba9221be8dbf88f8dc4a65cc9..052ce9f9d5002bac203cd7712c33a32b8671eb62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-09-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * 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.
 
index dc07761ec97a0926503863374e23810650d71189..5a279978481d9972c5e06c533e9e8e0aea4793e0 100644 (file)
@@ -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);