summaryrefslogtreecommitdiff
path: root/fastjar
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-04 22:40:55 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-04 22:40:55 +0000
commita993815f3140cc4c8ac4a8077fd49359ade66f01 (patch)
treea2275b322e1fbda4de93efefe466988c9fc36b9b /fastjar
parentd5d15736f782b75dd463fed4279ecfbfe62ce9ea (diff)
downloadgcc-a993815f3140cc4c8ac4a8077fd49359ade66f01.tar.gz
From greenrd@hotmail.com:
* jartool.c (list_jar): Correctly determine when new `filename' buffer must be allocated. Fixes PR java/7830. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56818 138bc75d-0d04-0410-961f-82ee72b054a4
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 42cc98ab390..6528dd0437f 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 2436606d502..7251185d61f 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);