From: Gary V. Vaughan Date: Sat, 22 Jun 2002 14:47:24 +0000 (+0000) Subject: * libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '0' X-Git-Tag: release-1-5~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=762853d3e250ad36c6111ffeb27d96042577074e;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '0' terminated by all code paths. Reported by Lutz Müller --- diff --git a/ChangeLog b/ChangeLog index e75dd4279..6dcfce2bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2002-06-20 Gary V. Vaughan +2002-06-21 Gary V. Vaughan + + * libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '\0' + terminated by all code paths. + Reported by Lutz Müller + +22002-06-20 Gary V. Vaughan From Kevin Ryde : * doc/libtool.texi (Platform quirks): s/dependan/dependen/ diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 26dc6683e..41e6ee3e3 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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] != '/')