From: Tom Tromey Date: Thu, 23 Sep 2004 23:40:33 +0000 (+0000) Subject: jartool.c (extract_jar): Unconditionally read extra data in the entry header... X-Git-Tag: releases/gcc-4.0.0~4662 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=847450b41d77461a88cde1fb4dffd5bde6f50c39;p=thirdparty%2Fgcc.git jartool.c (extract_jar): Unconditionally read extra data in the entry header... * jartool.c (extract_jar): Unconditionally read extra data in the entry header; don't read it after the file contents. From-SVN: r87990 --- diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 56538111880f..609b33905732 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,8 @@ +2004-09-23 Tom Tromey + + * jartool.c (extract_jar): Unconditionally read extra data in the + entry header; don't read it after the file contents. + 2004-08-11 Kelley Cook PR bootstrap/16164 diff --git a/fastjar/jartool.c b/fastjar/jartool.c index f43af14a62da..9431bb5e0a24 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -1805,8 +1805,10 @@ int extract_jar(int fd, char **files, int file_num){ exit(1); } + if (eflen > 0) + consume(&pbf, eflen); + if(method == 8 || flags & 0x0008){ - consume(&pbf, eflen); inflate_file(&pbf, f_fd, &ze); } else { @@ -1839,8 +1841,6 @@ int extract_jar(int fd, char **files, int file_num){ printf("%d bytes written\n", out_a); #endif } - - consume(&pbf, eflen); } /* if there is a data descriptor left, compare the CRC */