From: Ralf Wildenhues Date: Sat, 1 Sep 2007 08:10:02 +0000 (+0000) Subject: * libltdl/ltdl.c (tryall_dlopen_module): Fix string length X-Git-Tag: release-2-1b~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbbe0e88e41c61b5f8b48088718d5ac15bba2883;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (tryall_dlopen_module): Fix string length computation: do not allocate more than needed. --- diff --git a/ChangeLog b/ChangeLog index 0e15ec6dd..5e986b746 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-01 Ralf Wildenhues + + * libltdl/ltdl.c (tryall_dlopen_module): Fix string length + computation: do not allocate more than needed. + 2007-08-30 Ralf Wildenhues * libltdl/loaders/preopen.c (vm_close): `module' is unused. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 08027dbba..dc07761ec 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -484,7 +484,7 @@ tryall_dlopen_module (lt_dlhandle *handle, const char *prefix, /* Allocate memory, and combine DIRNAME and MODULENAME into it. The PREFIX (if any) is handled below. */ - filename = MALLOC (char, dirname_len + 1 + filename_len + 1); + filename = MALLOC (char, filename_len + 1); if (!filename) return 1;