summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-05-08 08:16:40 +0000
committerJunio C Hamano <gitster@pobox.com>2026-05-09 11:25:31 +0900
commitd05d6669778fa7dbd72f37c3ad9e4024ca8693d1 (patch)
tree1814d1346bdd2740055db9125386801ddd1cb2da /git-commit-script
parentf2063855fb50217f3720e868d799ed6cb3d0369f (diff)
git-zlib: handle data streams larger than 4GB
On Windows, zlib's `uLong` type is 32-bit even on 64-bit systems. When processing data streams larger than 4GB, the `total_in` and `total_out` fields in zlib's `z_stream` structure wrap around, which caused the sanity checks in `zlib_post_call()` to trigger `BUG()` assertions. The git_zstream wrapper now tracks its own 64-bit totals rather than copying them from zlib. The sanity checks compare only the low bits, using `maximum_unsigned_value_of_type(uLong)` to mask appropriately for the platform's `uLong` size. This is based on work by LordKiRon in git-for-windows#6076. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions