* libltdl/ltdl.c (find_file): oops, filenamesize was miscomputed

This commit is contained in:
Alexandre Oliva 1999-01-27 06:05:44 +00:00 committed by Alexandre Oliva
parent c2db1b3525
commit bf0865ed59
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,7 @@
1999-01-27 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (find_file): oops, filenamesize was miscomputed
* libltdl/ltdl.c (find_file): allocate filename dynamically
* libltdl/configure.in (AC_PROG_LIBTOOL): automake does not

View File

@ -904,10 +904,9 @@ find_file (basename, search_path, pdir, handle)
if (lendir + 1 + lenbase >= filenamesize) {
if (filename)
free(filename);
filename = (char*) malloc(lendir + 1 + lenbase);
if (filename)
filenamesize = filename;
else {
filenamesize = lendir + 1 + lenbase + 1;
filename = (char*) malloc(filenamesize);
if (!filename) {
last_error = memory_error;
return 0;
}