In the mdemo test, with
./mdemo nonexistent
I currently get
| can't open the module asd!
| error was: not enough memory
instead of the expected "file not found" error. The patch below should
fix this to be
| error was: file not found
by avoiding to substract a pointer from the NULL pointer.
This code seems to me not present in branch-1-5.
Cheers,
Ralf
2007-09-01 Ralf Wildenhues <[EMAIL PROTECTED]>
* libltdl/ltdl.c (try_dlopen): Fix computation of extension,
avoids subtracting pointer from NULL pointer.
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.260
diff -u -r1.260 ltdl.c
--- libltdl/ltdl.c 1 Sep 2007 08:13:20 -0000 1.260
+++ libltdl/ltdl.c 1 Sep 2007 10:20:10 -0000
@@ -1209,11 +1209,11 @@
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);