Files
coreutils/tests
Pádraig Brady 2ef53e5b04 basenc: --base58: fix buffer overflow with input > 15MB
base58_length() operated naively on an int
which resulted in an overflow to a negative number
for any input > 2^31-1/138, i.e. 15,561,475 bytes.

* src/basenc.c (base_length): Change input and output
parameter types from int to idx_t since this needs to
cater for the full input size in the base58 case.
(base58_length): Likewise.  Also reorder the calculation
to be less exact, but doing the division first
to minimize the chance of overflow (which now on 64 bit
would only happen for inputs > around 6 Exa bytes).
* tests/basenc/basenc-large.sh: Add a new test,
that triggers with valgrind or ASAN.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
2025-09-23 20:35:34 +01:00
..
2025-08-19 11:41:17 -07:00
2025-09-21 11:30:40 -07:00
2025-09-17 12:20:24 -07:00
2025-07-09 17:12:40 -07:00
2025-03-23 12:01:18 -07:00
2025-08-12 17:50:40 +01:00
2025-01-15 17:07:19 +00:00
2025-08-12 17:50:40 +01:00
2025-06-20 12:15:27 -07:00