Added
Link Here
|
1 |
--- zzip/mmapped.c.orig 2021-01-04 23:05:08 UTC |
2 |
+++ zzip/mmapped.c |
3 |
@@ -661,7 +661,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR |
4 |
|
5 |
___ /* a ZIP64 extended block may follow. */ |
6 |
size_t csize = zzip_file_header_csize(header); |
7 |
- off_t offset = zzip_file_header_to_data(header); |
8 |
+ size_t offset = zzip_file_header_sizeto_end(header); |
9 |
if (csize == 0xFFFFu) { |
10 |
struct zzip_extra_zip64* zip64 = |
11 |
zzip_file_header_to_extras(header); |
12 |
@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR |
13 |
file->zlib.zalloc = Z_NULL; |
14 |
file->zlib.zfree = Z_NULL; |
15 |
file->zlib.avail_in = csize; |
16 |
- file->zlib.next_in = offset; |
17 |
+ file->zlib.next_in = (Bytef *)header + offset; |
18 |
____; |
19 |
|
20 |
DBG2("compressed size %i", (int) file->zlib.avail_in); |