You are not logged in.
Hi Arnaud,
Thank you for an excellent set of components.
I encountered an issue with TZipWrite.AddDeflated for a buffer larger than 200 MB.
I will post the fix here, as I couldn't find a way to open a ticket.
procedure TZipWrite.AddDeflated(const aZipName: TFileName; Buf: pointer;
Size, CompressLevel, FileAge: integer);
...
zlastMod := FileAge;
tmpsize := (Size*11) div 10+12;
Getmem(tmp,tmpSize);
...
Size*11 will lead to an integer overflow for buffers larger than 200MB.
A simple way to avoid this is:
tmpsize := (Int64(Size)*11) div 10+12;
Keep up the good work!
J.
Offline
It is now fixed.
See http://synopse.info/fossil/info/e18cbe0a35
Thanks for the feedback!
Offline