Files
bitcoin/src/test/fuzz/util
MarcoFalke fa4b52bd16 fuzz: refactor memcpy to std::ranges::copy to work around ubsan warn
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 works around an UB-Sanitizer bug, when the source range is empty.

Fixes https://github.com/bitcoin/bitcoin/issues/33643
2025-10-30 11:08:27 +01:00
..