Re: On the speed of jarred BootCP

"Grzegorz B. Prokopski" <[email protected]>
Newsgroups gmane.comp.java.vm.sablevm.devel
Organization Debian http://www.debian.org - The Free Operating System
Message-ID <[email protected]>
On Fri, 2004-10-08 at 17:18, Rene Wagner wrote:
> a) zip on my system creates v2.0 zip archives which don't work with
>    the zip loader (took me some time and a lot of fprintf's to figure
>    that out).

The problem is now fixed in staging (rev. 2957).  I also attached the
diff if you find it more convenient.

HTH

				GBP

-- 
Grzegorz B. Prokopski      <[email protected]>
Debian GNU/Linux           http://www.debian.org
SableVM - LGPL'ed Java VM  http://www.sablevm.org
Why SableVM ?!?            http://sablevm.org/wiki/Features

_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel
fixed_zip.diff (text/x-patch, 1.3 KB)
Index: src/libsablevm/zip_file_reader.c
===================================================================
--- src/libsablevm/zip_file_reader.c	(revision 2956)
+++ src/libsablevm/zip_file_reader.c	(working copy)
@@ -342,7 +342,10 @@
     _svmt_u32 data_position = content_position + ZIP_LOCAL_FILE_HEADER_SIZE +
       _svmf_zip_read_value
       (zip_file->content, content_position +
-       ZIP_LOCAL_FILE_EXTRA_FLD_LEN_OFFSET, 4);
+       ZIP_LOCAL_FILE_NAME_LEN_OFFSET, 2) +
+      _svmf_zip_read_value
+      (zip_file->content, content_position +
+       ZIP_LOCAL_FILE_EXTRA_FLD_LEN_OFFSET, 2);
 
     /* Avoid segfaults in case of corrupted data in zip file. */
     if ((data_position + size_compressed >= zip_file->file_len)
Index: src/libsablevm/zip_file_reader.h
===================================================================
--- src/libsablevm/zip_file_reader.h	(revision 2956)
+++ src/libsablevm/zip_file_reader.h	(working copy)
@@ -31,7 +31,8 @@
 #define ZIP_LOCAL_FILE_COMPRESSION_OFFSET 8
 #define ZIP_LOCAL_FILE_COMP_SIZE_OFFSET 18
 #define ZIP_LOCAL_FILE_UNCOMP_SIZE_OFFSET 22
-#define ZIP_LOCAL_FILE_EXTRA_FLD_LEN_OFFSET 26
+#define ZIP_LOCAL_FILE_NAME_LEN_OFFSET 26
+#define ZIP_LOCAL_FILE_EXTRA_FLD_LEN_OFFSET 28
 
 #define ZIP_CENTRAL_DIR_ENTRY_SIZE 46
 #define ZIP_CENTRAL_DIR_MAGIC 0x50, 0x4b, 0x01, 0x02
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.