diff: widen `deflate_it()`'s bound local from int to `size_t`

Fixes a pre-existing silent narrowing from `git_deflate_bound()`'s `unsigned long` return into an `int` local: anything past 2 GiB has always wrapped negative here and then been re-extended to `size_t` inside `xmalloc()`. Also prep for the upcoming `git_deflate_bound()` widening to `size_t`, which would extend the narrowing further if `bound` stayed `int`. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 9, 2026 at 16:49 UTC a741ef9611e4ed9111a2e18f8f10d9a3ffa19f90
1 file changed +1 -1
diff.c
+1 -1
@@ -3609,7 +3609,7 @@ static unsigned char *deflate_it(char *data,
3609 unsigned long size,
3610 unsigned long *result_size)
3611 {
3612 - int bound;
3612 + size_t bound;
3613 unsigned char *deflated;
3614 git_zstream stream;
3615 struct repo_config_values *cfg = repo_config_values(the_repository);