We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ab6ff5 commit 393992bCopy full SHA for 393992b
src/test/fuzz/fuzz.cpp
@@ -4,10 +4,15 @@
4
5
#include <test/fuzz/fuzz.h>
6
7
+#include <netaddress.h>
8
+#include <netbase.h>
9
#include <test/util/setup_common.h>
10
#include <util/check.h>
11
+#include <util/sock.h>
12
13
#include <cstdint>
14
+#include <exception>
15
+#include <memory>
16
#include <unistd.h>
17
#include <vector>
18
@@ -29,6 +34,9 @@ static TypeTestOneInput* g_test_one_input{nullptr};
29
34
30
35
void initialize()
31
36
{
37
+ // Terminate immediately if a fuzzing harness ever tries to create a TCP socket.
38
+ CreateSock = [](const CService&) -> std::unique_ptr<Sock> { std::terminate(); };
39
+
32
40
bool should_abort{false};
33
41
if (std::getenv("PRINT_ALL_FUZZ_TARGETS_AND_ABORT")) {
42
for (const auto& t : FuzzTargets()) {
0 commit comments