summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-24 08:10:28 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-24 08:10:28 +0000
commitaba68506ffa9e16bbb138b3931ca4c44c4163fb8 (patch)
treebf4fd681e479c5d0f0b3d65c3e171456b590062a /libiberty
parentd564af81d2fe5a5b9ff310ba426ead4394d9e51f (diff)
downloadgcc-aba68506ffa9e16bbb138b3931ca4c44c4163fb8.tar.gz
Ensure return string is empty before using strcat to construct it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/make-relative-prefix.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 57ff7da31b5..c58dc1fd782 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-24 Nick Clifton <nickc@redhat.com>
+
+ * make-relative-prefix.c (make_relative_prefix): Ensure return
+ string is empty before using strcat to construct it.
+
2002-11-22 Daniel Jacobowitz <drow@mvista.com>
* Makefile.in: Add make-relative-prefix.c.
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c
index ae1ac54295a..ef9177e9c93 100644
--- a/libiberty/make-relative-prefix.c
+++ b/libiberty/make-relative-prefix.c
@@ -362,6 +362,7 @@ make_relative_prefix (progname, bin_prefix, prefix)
return NULL;
/* Build up the pathnames in argv[0]. */
+ *ret = '\0';
for (i = 0; i < prog_num; i++)
strcat (ret, prog_dirs[i]);