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

Function read_stdin

src/test/fuzz/fuzz.cpp:104–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103#if defined(PROVIDE_FUZZ_MAIN_FUNCTION)
104static bool read_stdin(std::vector<uint8_t>& data)
105{
106 uint8_t buffer[1024];
107 ssize_t length = 0;
108 while ((length = read(STDIN_FILENO, buffer, 1024)) > 0) {
109 data.insert(data.end(), buffer, buffer + length);
110 }
111 return length == 0;
112}
113#endif
114
115// This function is used by libFuzzer

Callers 1

mainFunction · 0.85

Calls 2

insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected