From: SourceForge.net <no...@so...> - 2008-06-02 12:40:02
|
Patches item #1948700, was opened at 2008-04-22 05:11 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=1948700&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Amir Szekely (kichik) Summary: support for files between 1.6 and 2 GB Initial Comment: currently, because of integer overflow issue, NSIS doesn't support compressing files whose size is between 1.6 and 2 GB for most cases, it could be solve by adding the following lines in build.cpp in function CEXEBuild::add_db_data if (bufferlen < 0) // we've hit a signed integer overflow (file is over 1.6 GB) bufferlen = INT_MAX-st-sizeof(int)-(16 << 20); // so maximize compressor room and hope the file compresses well under the line int bufferlen = length + 1024 + length / 4; // give a nice 25% extra space thanks ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-06-02 05:40 Message: Logged In: NO mmh... I think your fix is not correct bufferlen is used after the "db->resize" line, and if it does not reflect correctly the space available for compression output, and gets negative, the rest of the algorithm won't work... the line I indicated in the patch works correctly: bufferlen = INT_MAX-st-sizeof(int)-(16 << 20); // so maximize compressor room and hope the file compresses well ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2008-05-02 12:05 Message: Logged In: YES user_id=584402 Originator: NO Thanks, fixed with: if (bufferlen < 0) // too much data... try allocating as much as possible db->resize(max(st, 0x7fffffff)); else db->resize(st + bufferlen + sizeof(int)); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=1948700&group_id=22049 |