This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix a memory bug in java
- From: Richard Henderson <rth at redhat dot com>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Jun 2002 13:50:34 -0700
- Subject: Re: PATCH: Fix a memory bug in java
- References: <20020608091655.A9519@lucon.org>
On Sat, Jun 08, 2002 at 09:16:55AM -0700, H . J . Lu wrote:
> I will check it in as an obvious
> fix for both mainline and 3.1 branch.
You will do no such thing. You will wait for approval like
everyone else.
> 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")],
I can see what bug you are trying to fix, but I don't
think that's the only bug present. The whole sequence
here looks questionable.
r~