Commit ef4e4181 by Nick Clifton Committed by Nick Clifton

Ensure return string is empty before using strcat to construct it.

From-SVN: r59422
parent f60d9a8a
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.
......
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment