mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
fabeca3458refactor: Avoid UB in SHA3_256::Write (MarcoFalke)fad4032b21refactor: Drop unused UCharCast (MarcoFalke) Pull request description: It is UB to apply a distance to a pointer or iterator further than the end itself, even if the distance is (partially) revoked later on. Fix the issue by advancing the data pointer at most to the end. This fix is required to adopt C++ safe buffers https://github.com/bitcoin/bitcoin/issues/31272. Also included is a somewhat unrelated commit. ACKs for top commit: sipa: utACKfabeca3458theuni: utACKfabeca3458hebasto: ACKfabeca3458. Tree-SHA512: 78c53691322b72c3ba9c25ec94eec275dbbbc3049b0ad45e7d9fb2df0afbbaa905b0d8fa7106a3582f937bb1dc15a7592c4ad2d80fe4cff1062a3acfd3638f08