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-29 Gary V. Vaughan <gary@gnu.org>
+
+ * 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 <tanner@gmx.de>
* NEWS: updated
} 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);