diff options
author | H.J. Lu <hjl@gnu.org> | 2002-06-08 16:34:39 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2002-06-08 09:34:39 -0700 |
commit | c238d8067bf43c2c9bf0ad55497cc26bf53af85b (patch) | |
tree | d839c8487cf59d908a49b9dfadce5982f84bce1e | |
parent | cfb06024b8cd84edf9a5361039a9b6fcd93b579e (diff) | |
download | gcc-c238d8067bf43c2c9bf0ad55497cc26bf53af85b.zip gcc-c238d8067bf43c2c9bf0ad55497cc26bf53af85b.tar.gz gcc-c238d8067bf43c2c9bf0ad55497cc26bf53af85b.tar.bz2 |
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
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/jcf-path.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 10a4746..9dab4a5 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 <tromey@redhat.com> * 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 a87703e..b68a538 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")], |