MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetArgs

Function SetArgs

src/test/fuzz/fuzz.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34static std::vector<const char*> g_args;
35
36static void SetArgs(int argc, char** argv) {
37 for (int i = 1; i < argc; ++i) {
38 // Only take into account arguments that start with `--`. The others are for the fuzz engine:
39 // `fuzz -runs=1 fuzz_seed_corpus/address_deserialize_v2 --checkaddrman=5`
40 if (strlen(argv[i]) > 2 && argv[i][0] == '-' && argv[i][1] == '-') {
41 g_args.push_back(argv[i]);
42 }
43 }
44}
45
46const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS = []() {
47 return g_args;

Callers 1

LLVMFuzzerInitializeFunction · 0.85

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected