From: DJ Delorie Date: Sun, 24 Nov 2002 15:59:22 +0000 (+0000) Subject: merge from gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=756954c3c911ad904623426b5631436511b95cca;p=binutils-gdb.git merge from gcc --- 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 + + * make-relative-prefix.c (make_relative_prefix): Ensure return + string is empty before using strcat to construct it. + 2002-11-22 Daniel Jacobowitz * 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]);