gcc.c (make_relative_prefix): Allocate a sufficiently large buffer.
* gcc.c (make_relative_prefix): Allocate a sufficiently large buffer. From-SVN: r45049
This commit is contained in:
parent
2a895e441a
commit
27a1448728
@ -1,3 +1,8 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user