From 762853d3e250ad36c6111ffeb27d96042577074e Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Sat, 22 Jun 2002 14:47:24 +0000 Subject: [PATCH] =?utf8?q?*=20libltdl/ltdl.c=20(foreach=5Fdirinpath):=20En?= =?utf8?q?sure=20that=20filename=20is=20'0'=20terminated=20by=20all=20code?= =?utf8?q?=20paths.=20Reported=20by=20Lutz=20M=FCller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ChangeLog | 8 +++++++- libltdl/ltdl.c | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) 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] != '/') -- 2.47.3