From: H.J. Lu Date: Sat, 8 Jun 2002 16:33:46 +0000 (+0000) Subject: jcf-path.c (jcf_path_init): Allocate 1 more byte for string. X-Git-Tag: releases/gcc-3.1.1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3ca0272655b92d403fcee4a019aa7920136ce5a;p=thirdparty%2Fgcc.git jcf-path.c (jcf_path_init): Allocate 1 more byte for string. 2002-06-08 H.J. Lu (hjl@gnu.org) * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. From-SVN: r54383 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 5553139643d3..6f4a6dca1eb9 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2002-06-08 H.J. Lu (hjl@gnu.org) + + * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. + 2002-06-03 Mark Mitchell 2002-05-18 Mark Mitchell diff --git a/gcc/java/jcf-path.c b/gcc/java/jcf-path.c index a87703e5ac02..b68a538f45b7 100644 --- a/gcc/java/jcf-path.c +++ b/gcc/java/jcf-path.c @@ -305,7 +305,7 @@ jcf_path_init () /* Desperation: use the installed one. */ char *extdirs; add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1); - extdirs = (char *) alloca (strlen (LIBGCJ_ZIP_FILE)); + extdirs = (char *) alloca (strlen (LIBGCJ_ZIP_FILE) + 1); strcpy (extdirs, LIBGCJ_ZIP_FILE); strcpy (&extdirs[strlen (LIBGCJ_ZIP_FILE) - strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],