mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 06:37:50 +02:00
Normally, the values are small enough to fit in size_t, but the risk that it may not fit sometimes is a reason to use uint64_t consistently for all architectures. On 64-bit systems, this refactor is a no-op. On 32-bit systems, it could avoid bugs in the theoretical and unexpected case where a 32-bit size_t is too small and overflows. For example, 32-bit Bitcoin Core versions with CVE-2025-46597 unfixed may overflow while checking for the bad-blk-length violation when receiving a malformed and bloated compact block.
41 KiB
41 KiB