libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libltdl - PATCH


From: Lutz Müller
Subject: libltdl - PATCH
Date: 17 Jun 2002 16:00:44 +0200

Hi!

After the discussion on address@hidden, I propose the following patch:

Index: ChangeLog
===================================================================
RCS file: /var/cvs/libtool/ChangeLog,v
retrieving revision 1.1057
diff -u -3 -p -r1.1057 ChangeLog
--- ChangeLog   21 Sep 2001 03:28:38 -0000      1.1057
+++ ChangeLog   17 Jun 2002 13:16:50 -0000
@@ -1,3 +1,7 @@
+2002-06-17  Lutz Müller  <address@hidden>
+
+       * libltdl/ltdl.c: Correct usage of strncpy.
+
 2001-09-21  Gary V. Vaughan  <address@hidden>

        * libltdl/ltdl.c: Added support for dmalloc, and uncovered some
Index: libltdl/ltdl.c
===================================================================
RCS file: /var/cvs/libtool/libltdl/ltdl.c,v
retrieving revision 1.158
diff -u -3 -p -r1.158 ltdl.c
--- libltdl/ltdl.c      21 Sep 2001 03:28:39 -0000      1.158
+++ libltdl/ltdl.c      17 Jun 2002 13:16:53 -0000
@@ -2200,6 +2200,8 @@ foreach_dirinpath (search_path, base_nam
        }

        strncpy (filename, dir_name, lendir);
+       filename[lendir] = LT_EOS_CHAR;
+
        if (base_name && *base_name)
          {
            if (filename[lendir -1] != '/')


Note that for filename, 'lendir + 1 + ...' bytes have been allocated.
Therefore, the use of strncpy is not really necessary. But if you use
it, you need to ensure termination of the string.

Please approve and commit to CVS.

Thank you very much!

Lutz Müller
-- 
+----------------------------------------------+
| Lutz Müller                 +49 (7156) 34837 |
|                                              |
| Hans-Sachs-Strasse 5                         |
| 71254 Ditzingen       http://www.topfrose.de |
| Germany           address@hidden |
+----------------------------------------------+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]