Commit f419d5f
committed
#840 Restore stream position after reading data descriptor in read close
The data descriptor reading in mz_zip_entry_read_close seeks the stream to the local header and skips forward to read CRC and sizes.
This left the stream at an incorrect position, corrupting subsequent mz_zip_goto_next_entry calls.
Fix by saving and restoring the stream position and disk number around the seek-and-read block, matching the pattern used in mz_zip_entry_write_close.1 parent b59f684 commit f419d5f
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2088 | 2088 | | |
2089 | 2089 | | |
2090 | 2090 | | |
| 2091 | + | |
| 2092 | + | |
2091 | 2093 | | |
2092 | 2094 | | |
2093 | 2095 | | |
| |||
2110 | 2112 | | |
2111 | 2113 | | |
2112 | 2114 | | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
2113 | 2119 | | |
2114 | 2120 | | |
2115 | 2121 | | |
| |||
2129 | 2135 | | |
2130 | 2136 | | |
2131 | 2137 | | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2132 | 2142 | | |
2133 | 2143 | | |
2134 | 2144 | | |
| |||
0 commit comments