unzip module in "paszlib" can not may uncompress files bigger than 32 kb
Original Reporter info from Mantis: vuvk69
-
Reporter name: Anton Vuvk
Original Reporter info from Mantis: vuvk69
- Reporter name: Anton Vuvk
Description:
function "unzReadCurrentFile" in "unzip.pas" can not read more than 32 KB because it uses a pointer of type "PByteArray", which is defined as an array of 32767 bytes:
PByteArray = ^TByteArray;
TByteArray = Array[0..{$ifdef CPU16}32766{$else}32767{$endif}] of Byte;
error in lines:
for i := 0 to uDoCopy - 1 do
Pbytearray(pfile_in_zip_read_info^.stream.next_out)^[i] :=
Pbytearray(pfile_in_zip_read_info^.stream.next_in)^[i];
and:
if (buf^[i] = $50) and (buf^[i + 1] = $4b) and { ENDHEADERMAGIC }
(buf^[i + 2] = $05) and (buf^[i + 3] = $06) then
Additional information:
The error correction file is attached. Find the word "Vuvk" to see what I've fixed.
Mantis conversion info:
- Mantis ID: 33197
- Version: 3.0.4
- Fixed in version: 3.1.1
- Fixed in revision: 38303 (#70813ac7)
- Target version: 3.2.0