2017-09-21 23:33:01 +00:00
|
|
|
// From https://svn.boost.org/trac10/ticket/12818
|
|
|
|
// This fuzz target can likely be enhanced to exercise more code.
|
2018-03-02 06:09:23 +00:00
|
|
|
// The ideal place for this fuzz target is the boost repository.
|
2017-09-21 23:33:01 +00:00
|
|
|
#include <boost/regex.hpp>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
|
|
|
try {
|
|
|
|
std::string str((char *)Data, Size);
|
|
|
|
boost::regex e(str);
|
|
|
|
boost::match_results<std::string::const_iterator> what;
|
|
|
|
boost::regex_match(str, what, e,
|
|
|
|
boost::match_default | boost::match_partial);
|
|
|
|
|
|
|
|
} catch (const std::exception &) {
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|