Commit ecef190c by Andrew Haley Committed by Andrew Haley

jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes...

1999-03-12  Andrew Haley  <aph@cygnus.com>
        * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
        we'll need a directory separator and a null character.

From-SVN: r25726
parent 6655a9bc
1999-03-12 Andrew Haley <aph@cygnus.com>
* jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
we'll need a directory separator and a null character.
Wed Mar 10 23:20:11 1999 Per Bothner <bothner@cygnus.com>
* jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
......
......@@ -158,7 +158,7 @@ add_entry (entp, filename, is_system)
work more easily. Eww. */
if (filename[len - 1] != '/' && filename[len - 1] != DIR_SEPARATOR)
{
char *f2 = (char *) alloca (len + 1);
char *f2 = (char *) alloca (len + 2);
strcpy (f2, filename);
f2[len] = DIR_SEPARATOR;
f2[len + 1] = '\0';
......
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