mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 12:39:47 +01:00
31c4e77a25test: fix ReadTopologicalSet unsigned integer overflow (ismaelsadeeq) Pull request description: This PR is a simple fix for a potential unsigned integer overflow in ReadTopologicalSet. We obtain the value of `mask` from fuzz input, which can be the maximum representable value. Adding 1 to it would then cause an overflow. The fix skips the addition when the read value is already the maximum. See https://github.com/bitcoin/bitcoin/pull/30605#discussion_r2215338569 for more context ACKs for top commit: maflcko: lgtm ACK31c4e77a25Tree-SHA512: f58d7907f66a0de0ed8d4b1cad6a4971f65925a99f3c030537c21c4d84126b643257c65865242caf7d445b9cbb7a71a1816a9f870ab7520625c4c16cd41979cb