From c238d8067bf43c2c9bf0ad55497cc26bf53af85b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 8 Jun 2002 16:34:39 +0000 Subject: [PATCH] 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: r54384 --- gcc/java/ChangeLog | 4 ++++ gcc/java/jcf-path.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 10a4746a8d0..9dab4a5ebd8 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-04 Tom Tromey * jcf-write.c (perform_relocations): Optmize a goto to a goto. diff --git a/gcc/java/jcf-path.c b/gcc/java/jcf-path.c index a87703e5ac0..b68a538f45b 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")], -- 2.11.4.GIT