diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-08-13 14:55:50 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-13 09:42:03 -0700 |
| commit | b4b9a8cdbd218a145c89685467fda03c9c2df07c (patch) | |
| tree | 4a082e4a235cd3cbd9a6dd39e369776fc74a6842 /gitweb/gitweb.css | |
| parent | aed4048938bde401a3d22207a4cce167385c8ba7 (diff) | |
git-zlib: widen `git_deflate_bound()` to `size_t`
All four `unsigned long`/`int`/`ssize_t` receivers across archive-zip,
diff, http-push and t/helper/test-pack-deltas were widened to `size_t`
in the prior commits, and remote-curl and fast-import were already
there. With every caller prepared, both the parameter and the return
type can now move without introducing any silent narrowing.
For inputs above zlib's `uLong` range (i.e. >4 GiB on platforms where
`uLong` is 32-bit, notably 64-bit Windows), defer to zlib's stored-block
formula (the same fallback it would itself use, see
https://github.com/madler/zlib/blob/v1.3.2/deflate.c#L832-L928 keeping
in mind that for large sizes, the `storelen` would be relevant, also
compare with https://github.com/madler/zlib/issues/549 for a fuller
story) plus the worst-case wrapper overhead. The existing path through
`deflateBound()` is unchanged for inputs that fit.
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.css')
0 files changed, 0 insertions, 0 deletions
