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

Function FUZZ_TARGET

src/test/fuzz/parse_numbers.cpp:11–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <string>
10
11FUZZ_TARGET(parse_numbers)
12{
13 const std::string random_string(buffer.begin(), buffer.end());
14
15 (void)ParseMoney(random_string);
16
17 uint8_t u8;
18 (void)ParseUInt8(random_string, &u8);
19
20 uint16_t u16;
21 (void)ParseUInt16(random_string, &u16);
22
23 int32_t i32;
24 (void)ParseInt32(random_string, &i32);
25 (void)LocaleIndependentAtoi<int>(random_string);
26
27 uint32_t u32;
28 (void)ParseUInt32(random_string, &u32);
29
30 int64_t i64;
31 (void)LocaleIndependentAtoi<int64_t>(random_string);
32 (void)ParseFixedPoint(random_string, 3, &i64);
33 (void)ParseInt64(random_string, &i64);
34
35 uint64_t u64;
36 (void)ParseUInt64(random_string, &u64);
37}

Callers

nothing calls this directly

Calls 10

ParseMoneyFunction · 0.85
ParseUInt8Function · 0.85
ParseUInt16Function · 0.85
ParseUInt32Function · 0.85
ParseFixedPointFunction · 0.85
ParseUInt64Function · 0.85
ParseInt32Function · 0.50
ParseInt64Function · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected