[compiler-rt] Don't pass null pointers to memcmp and memcpy in libFuzzer (PR #96775)

David Benjamin via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 09:01:11 PDT 2024


================
@@ -579,6 +579,9 @@ void Fuzzer::CrashOnOverwrittenData() {
 // Compare two arrays, but not all bytes if the arrays are large.
 static bool LooseMemeq(const uint8_t *A, const uint8_t *B, size_t Size) {
   const size_t Limit = 64;
+  // memcmp cannot be passed empty slices when the pointers are null.
----------------
davidben wrote:

Done

https://github.com/llvm/llvm-project/pull/96775


More information about the llvm-commits mailing list