This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: fastjar fix


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);
         


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]