]> 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:55:44 +0000 (14:55 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sat, 22 Jun 2002 14:55:44 +0000 (14:55 +0000)
terminated by all code paths.
Reported by Lutz Müller <lutz@users.sourceforge.net>

ChangeLog
libltdl/ltdl.c

index 6053c4ee5741a8433b02c4ad812b9b497bf965a1..51829768cd6a1eef6e84fce74bbd75efd397ab42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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>
+
 2002-06-20  Gary V. Vaughan  <gary@gnu.org>
 
        From Kevin Ryde  <user42@zip.com.au>:
index 03a60ec4c83d5155a59cf24684ae8db47c9aa0e0..58e76ef17c7f17156e4f0c56d9bcc0b7fc2c0d1e 100644 (file)
@@ -2199,7 +2199,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] != '/')