From d0e4cb3f079041949369cf115c8fb1b2a608bd21 Mon Sep 17 00:00:00 2001 From: Jiwoo Park Date: Mon, 30 Oct 2023 08:26:06 +0900 Subject: [PATCH] Include missing stdint.h on fuzz test (#1700) * Include missing stdint.h * Remove std:: from uint8_t --- test/fuzzing/server_fuzzer.cc | 3 ++- test/fuzzing/standalone_fuzz_target_runner.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/fuzzing/server_fuzzer.cc b/test/fuzzing/server_fuzzer.cc index 41f710f..3c0e948 100644 --- a/test/fuzzing/server_fuzzer.cc +++ b/test/fuzzing/server_fuzzer.cc @@ -1,5 +1,6 @@ +#include + #include -#include class FuzzedStream : public httplib::Stream { public: diff --git a/test/fuzzing/standalone_fuzz_target_runner.cpp b/test/fuzzing/standalone_fuzz_target_runner.cpp index 945ce17..e8bd5ed 100644 --- a/test/fuzzing/standalone_fuzz_target_runner.cpp +++ b/test/fuzzing/standalone_fuzz_target_runner.cpp @@ -5,9 +5,9 @@ // on the test corpus or on a single file, // e.g. the one that comes from a bug report. -#include -#include +#include #include +#include #include // Forward declare the "fuzz target" interface. @@ -21,7 +21,7 @@ int main(int argc, char **argv) { std::ifstream in(argv[i]); in.seekg(0, in.end); size_t length = static_cast(in.tellg()); - in.seekg (0, in.beg); + in.seekg(0, in.beg); std::cout << "Reading " << length << " bytes from " << argv[i] << std::endl; // Allocate exactly length bytes so that we reliably catch buffer overflows. std::vector bytes(length);