* libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '0'

terminated by all code paths.
Reported by Lutz Mller <lutz@users.sourceforge.net>
This commit is contained in:
Gary V. Vaughan 2002-06-22 14:47:24 +00:00
parent 1d69b1c81b
commit 762853d3e2
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,10 @@
2002-06-20 Gary V. Vaughan <gary@gnu.org>
2002-06-21 Gary V. Vaughan <gary@gnu.org>
* libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '\0'
terminated by all code paths.
Reported by Lutz Müller <lutz@users.sourceforge.net>
22002-06-20 Gary V. Vaughan <gary@gnu.org>
From Kevin Ryde <user42@zip.com.au>:
* doc/libtool.texi (Platform quirks): s/dependan/dependen/

View File

@ -2195,7 +2195,9 @@ foreach_dirinpath (search_path, base_name, func, data1, data2)
goto cleanup;
}
strncpy (filename, dir_name, lendir);
assert (filenamesize > lendir);
strcpy (filename, dir_name);
if (base_name && *base_name)
{
if (filename[lendir -1] != '/')