aboutsummaryrefslogtreecommitdiff
path: root/fastjar
diff options
context:
space:
mode:
Diffstat (limited to 'fastjar')
-rw-r--r--fastjar/ChangeLog6
-rw-r--r--fastjar/jartool.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog
index 42cc98a..6528dd0 100644
--- a/fastjar/ChangeLog
+++ b/fastjar/ChangeLog
@@ -1,3 +1,9 @@
+2002-09-04 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.
+
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
* configure.in: Support cross-compiling.
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index 2436606..7251185 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -1657,7 +1657,7 @@ int list_jar(int fd, char **files, int file_num){
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 @@ int list_jar(int fd, char **files, int file_num){
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);