From bd3c792507e1a1003f7532088e976665dcbe4628 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 16 Oct 2020 07:35:53 -0700 Subject: [PATCH] Fix float fuzzer --- test/fuzzing/float.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fuzzing/float.cc b/test/fuzzing/float.cc index 1a425690..a9a347ef 100644 --- a/test/fuzzing/float.cc +++ b/test/fuzzing/float.cc @@ -28,7 +28,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { char* ptr = nullptr; if (std::strtod(buffer.data(), &ptr) != value) throw std::runtime_error("round trip failure"); - if (ptr != buffer.end()) + if (ptr + 1 != buffer.end()) throw std::runtime_error("unparsed output"); return 0; }