From: Ralf Wildenhues Date: Sat, 1 Sep 2007 10:42:34 +0000 (+0000) Subject: * libltdl/ltdl.c (try_dlopen): Fix computation of extension, X-Git-Tag: release-2-1b~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86a2c620c8981319088e6d62d747c1caf32303be;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (try_dlopen): Fix computation of extension, avoids subtracting pointer from NULL pointer. --- diff --git a/ChangeLog b/ChangeLog index 052ce9f9d..64d37a5cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-09-01 Ralf Wildenhues + * libltdl/ltdl.c (try_dlopen): Fix computation of extension, + avoids subtracting pointer from NULL pointer. + * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test array address of sys_dlsearch_path against NULL, rather test for nonempty contents. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 5a2799784..5abb124b6 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1209,11 +1209,11 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, assert (base_name && *base_name); + ext = strrchr (base_name, '.'); if (!ext) { ext = base_name + LT_STRLEN (base_name); } - ext = strrchr (base_name, '.'); /* extract the module name from the file name */ name = MALLOC (char, ext - base_name + 1);