]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
authorH.J. Lu <hjl@gnu.org>
Sat, 8 Jun 2002 16:33:46 +0000 (16:33 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sat, 8 Jun 2002 16:33:46 +0000 (09:33 -0700)
2002-06-08  H.J. Lu  (hjl@gnu.org)

* jcf-path.c (jcf_path_init): Allocate 1 more byte for string.

From-SVN: r54383

gcc/java/ChangeLog
gcc/java/jcf-path.c

index 5553139643d31601cc9cc42d9e5386ac4e78929b..6f4a6dca1eb9103fe1952affe0826d22edc3094c 100644 (file)
@@ -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  <mark@codesourcery.com>
 
        2002-05-18  Mark Mitchell  <mark@codesourcery.com>
index a87703e5ac02caa70c916fddba228e36c73478aa..b68a538f45b7ba73881c3316335dfadd94a02dc3 100644 (file)
@@ -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")],