first take basing fuzz on v3

This commit is contained in:
Paul Dreik
2020-09-23 21:54:09 +02:00
committed by Martin Hořeňovský
parent 340ff00058
commit 0098a76fef
8 changed files with 117 additions and 0 deletions

20
fuzzing/NullOStream.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include <iostream>
// from https://stackoverflow.com/a/8244052
class NullStreambuf : public std::streambuf {
char dummyBuffer[64];
protected:
virtual int overflow(int c) override final;
};
class NullOStream final : private NullStreambuf, public std::ostream {
public:
NullOStream() : std::ostream(this) {}
NullStreambuf *rdbuf() { return this; }
virtual void avoidOutOfLineVirtualCompilerWarning();
};