Unlike the previous series, these aren't about "long" on Windows: the types involved ("uint32_t", "int", "unsigned int") are 32 bits on every platform. They were found by scanning a native 64-bit Linux build with -Wshorten-64-to-32. That scan sees the "unsigned long" -> 32-bit conversions that a Windows target can't see, because there "long" is already 32 bits.
- 1/3 hashwrite(): a corrupt pack when pack-objects writes a compressed buffer of 4GiB or more in one call; - 2/3 count_lines(): a wrong diff -B --stat for files of 2GiB or more; - 3/3 hash_chars(): renames of files of 4GiB or more aren't recognised.
No tests, because they need GiB-sized inputs; each was verified by simulating the truncation at 16 bits.
The other results of that scan are bounded by the format or by the input (options, masks, line lengths, xdiff limited to 1023MiB). It doesn't depend on the other series in flight and merges cleanly with them. Based on master 50fe5cc63f.
Elia Pinto (3): csum-file: use size_t for the count passed to hashwrite() diff: use size_t for the size passed to count_lines() diffcore-delta: use size_t for the size of the buffer to hash
csum-file.c | 2 +- csum-file.h | 2 +- diff.c | 2 +- diffcore-delta.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
base-commit: 50fe5cc63f9cd6e89b87a2c9ccf96a444f4cfdb7
-- 2.53.0