Include missing stdint.h on fuzz test (#1700)
* Include missing stdint.h * Remove std:: from uint8_t
This commit is contained in:
parent
e2813d9d4d
commit
d0e4cb3f07
@ -1,5 +1,6 @@
|
|||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include <httplib.h>
|
#include <httplib.h>
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
class FuzzedStream : public httplib::Stream {
|
class FuzzedStream : public httplib::Stream {
|
||||||
public:
|
public:
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
// on the test corpus or on a single file,
|
// on the test corpus or on a single file,
|
||||||
// e.g. the one that comes from a bug report.
|
// e.g. the one that comes from a bug report.
|
||||||
|
|
||||||
#include <cassert>
|
#include <cstdint>
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// Forward declare the "fuzz target" interface.
|
// Forward declare the "fuzz target" interface.
|
||||||
@ -21,7 +21,7 @@ int main(int argc, char **argv) {
|
|||||||
std::ifstream in(argv[i]);
|
std::ifstream in(argv[i]);
|
||||||
in.seekg(0, in.end);
|
in.seekg(0, in.end);
|
||||||
size_t length = static_cast<size_t>(in.tellg());
|
size_t length = static_cast<size_t>(in.tellg());
|
||||||
in.seekg (0, in.beg);
|
in.seekg(0, in.beg);
|
||||||
std::cout << "Reading " << length << " bytes from " << argv[i] << std::endl;
|
std::cout << "Reading " << length << " bytes from " << argv[i] << std::endl;
|
||||||
// Allocate exactly length bytes so that we reliably catch buffer overflows.
|
// Allocate exactly length bytes so that we reliably catch buffer overflows.
|
||||||
std::vector<char> bytes(length);
|
std::vector<char> bytes(length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user