From: Gary V. Vaughan Date: Mon, 29 Mar 1999 13:22:00 +0000 (+0000) Subject: * libltdl/ltdl.c (lt_dladdsearchdir): Forgot to mallocate the X-Git-Tag: release-1-3~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6da938cfe0ebdc9bb953f340bfb39ed039ba09e;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (lt_dladdsearchdir): Forgot to mallocate the extra byte of memory for the teminating NUL, and forgot to strcpy the original path in to the new memory before appending the new path compononent. --- diff --git a/ChangeLog b/ChangeLog index ed70d8a66..68edbd927 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-03-29 Gary V. Vaughan + + * libltdl/ltdl.c (lt_dladdsearchdir): Forgot to mallocate the + extra byte of memory for the teminating NUL, and forgot to + strcpy the original path in to the new memory before appending + the new path compononent. + 1999-03-27 Thomas Tanner * NEWS: updated diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 734476206..f0a344a08 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1535,11 +1535,12 @@ lt_dladdsearchdir (search_dir) } else { char *new_search_path = (char*) lt_dlmalloc(strlen(user_search_path) + - strlen(search_dir) + 1); + strlen(search_dir) + 2); /* ':' + '\0' == 2 */ if (!new_search_path) { last_error = memory_error; return 1; } + strcpy(new_search_path, user_search_path); strcat(new_search_path, ":"); strcat(new_search_path, search_dir); lt_dlfree(user_search_path);