18 std::optional<size_t> sep_pos_opt;
19 for (
size_t pos = 0; pos < buffer.size(); ++pos) {
20 uint8_t x = buffer[pos];
21 if ((x & 0xFE) == 0)
continue;
23 if (sep_pos_opt)
return;
29 if (!sep_pos_opt)
return;
30 const size_t sep_pos{sep_pos_opt.value()};
31 if (buffer.size() - sep_pos - 1 > 128)
return;
34 std::vector<bool> asmap(buffer.begin(), buffer.begin() + sep_pos);
37 std::vector<bool> asmap_prefix = asmap;
38 while (!asmap_prefix.empty() && asmap_prefix.size() + 7 > asmap.size() && asmap_prefix.back() ==
false) {
39 asmap_prefix.pop_back();
41 while (!asmap_prefix.empty()) {
42 asmap_prefix.pop_back();
46 std::vector<bool> addr(buffer.begin() + sep_pos + 1, buffer.end());
FUZZ_TARGET(asmap_direct)
uint32_t Interpret(const std::vector< bool > &asmap, const std::vector< bool > &ip)
bool SanityCheckASMap(const std::vector< bool > &asmap, int bits)