]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '0'
authorGary V. Vaughan <gary@gnu.org>
Sat, 22 Jun 2002 14:47:24 +0000 (14:47 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sat, 22 Jun 2002 14:47:24 +0000 (14:47 +0000)
terminated by all code paths.
Reported by Lutz Müller <lutz@users.sourceforge.net>

ChangeLog
libltdl/ltdl.c

index e75dd42793b3b1432619475175f30d7de8bd07d3..6dcfce2bcb81d8f4705a3c7da037ca6b6c6f3165 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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/
index 26dc6683e0d3891f73862da339de85ef5251c7d0..41e6ee3e3e7877449dced1b5b4b45b0c8ed4e298 100644 (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] != '/')