This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: fastjar fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 04 Sep 2002 16:42:26 -0600
- Subject: Patch: FYI: fastjar fix
- Reply-to: tromey at redhat dot com
I'm checking this in.
This is the patch from PR 7830. It fixes a bug in fastjar.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
From greenrd@hotmail.com:
* jartool.c (list_jar): Correctly determine when new `filename'
buffer must be allocated. Fixes PR java/7830.
Index: jartool.c
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/jartool.c,v
retrieving revision 1.14
diff -u -r1.14 jartool.c
--- jartool.c 18 Mar 2002 11:08:21 -0000 1.14
+++ jartool.c 4 Sep 2002 22:39:07 -0000
@@ -1657,7 +1657,7 @@
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
}
- if(filename_len < fnlen){
+ if(filename_len < fnlen + 1){
if(filename != NULL)
free(filename);
@@ -1776,7 +1776,7 @@
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
}
- if(filename_len < fnlen){
+ if(filename_len < fnlen + 1){
if(filename != NULL)
free(filename);