Commit 27a14487 by Matt Kraai Committed by Matt Kraai

gcc.c (make_relative_prefix): Allocate a sufficiently large buffer.

	* gcc.c (make_relative_prefix): Allocate a sufficiently large
	buffer.

From-SVN: r45049
parent 2a895e44
2001-08-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
* gcc.c (make_relative_prefix): Allocate a sufficiently large
buffer.
2001-08-20 Richard Henderson <rth@redhat.com>
* final.c (end_final): Fix typo last change.
......
......@@ -2285,8 +2285,12 @@ make_relative_prefix (progname, bin_prefix, prefix)
GET_ENV_PATH_LIST (temp, "PATH");
if (temp)
{
char *startp, *endp;
char *nstore = (char *) alloca (strlen (temp) + strlen (progname) + 1);
char *startp, *endp, *nstore;
size_t prefixlen = strlen (temp) + 1;
if (prefixlen < 2)
prefixlen = 2;
nstore = (char *) alloca (prefixlen + strlen (progname) + 1);
startp = endp = temp;
while (1)
......
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