diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-12 00:49:42 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-12 00:49:42 +0000 |
commit | c564d962f8f342292839832af9e17b60782b92f7 (patch) | |
tree | 980da913581d6b64139b88657a938118d2686395 /fastjar | |
parent | c2a5cd56d55c705c6bf8f4bd84844bb7038cfcb6 (diff) | |
download | gcc-c564d962f8f342292839832af9e17b60782b92f7.tar.gz |
* jatool.c (extract_jar): Account for null termination when
determining whether to expand "filename".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46220 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fastjar')
-rw-r--r-- | fastjar/ChangeLog | 5 | ||||
-rw-r--r-- | fastjar/jartool.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 0a6fcd8822b..918454a57da 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,8 @@ +2001-10-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * jatool.c (extract_jar): Account for null termination when determining + whether to expand "filename". + 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com> * jartool.c (add_to_jar): Return 1 if `stat' initialy failed. diff --git a/fastjar/jartool.c b/fastjar/jartool.c index 150ffdc33db..d4d15e9dae3 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -17,9 +17,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: jartool.c,v 1.7 2001/08/27 23:09:37 tromey Exp $ +/* $Id: jartool.c,v 1.8 2001/08/29 01:35:31 apbianco Exp $ $Log: jartool.c,v $ + Revision 1.8 2001/08/29 01:35:31 apbianco + 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com> + + * jartool.c (add_to_jar): Return 1 if `stat' initialy failed. + Fixes PR java/3949. + + (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01641.html) + Revision 1.7 2001/08/27 23:09:37 tromey * jartool.c (jarfile): Remove length limitation. (main): Use jt_strdup when initializing jarfile. @@ -1302,7 +1310,7 @@ int extract_jar(int fd, char **files, int file_num){ #endif } - if(filename_len < fnlen){ + if(filename_len < fnlen + 1){ if(filename != NULL) free(filename); |