mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-12 00:26:03 +01:00
fa4b52bd16fuzz: refactor memcpy to std::ranges::copy to work around ubsan warn (MarcoFalke) Pull request description: Using std::ranges::copy from the C++ standard library has a few benefits here: * It has the additional benefit of being a bit more type safe and document the byte cast explicitly. * The compiler will likely optimize it to the same asm, but performance doesn't really matter here anyway. * It has defined semantics for empty source ranges. Fixes https://github.com/bitcoin/bitcoin/issues/33643 ACKs for top commit: marcofleon: tACKfa4b52bd16dergoegge: utACKfa4b52bd16Tree-SHA512: 04fcf096e3cfc526e996c9313ec6e0a4d12c382fa19cb846b51564d33de2f0ef78a588fc6a936da0c76ca8bc9d9db4a824c36d99413db4f538a98239864d48f0