]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/regex/test/de_fuzz/narrow.cpp
2 #include <boost/regex.hpp>
4 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
)
9 size_t len
= (Data
[1] << 8) | Data
[0];
10 if(len
> Size
- 2) len
= Size
- 2;
11 std::string
str((char*)(Data
+ 2), len
);
12 std::string
text((char*)(Data
+ len
), Size
- len
);
15 regex_search(text
, what
, e
, boost::match_default
|boost::match_partial
);
17 catch(const std::exception
&){}