mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-29 11:16:30 +03:00
sync code
This commit is contained in:
@@ -80,7 +80,7 @@ kiss_pmglob_string_s::kiss_pmglob_string_s(const char *buffer, size_t size, int
|
||||
|
||||
kiss_pmglob_string_s::kiss_pmglob_string_s(const u_char *buffer, size_t size, int _pattern_id, u_int _flags)
|
||||
{
|
||||
dbgAssert(buffer && size > 0) << "Illegal arguments";
|
||||
dbgAssert(buffer && size > 0) << AlertInfo(AlertTeam::CORE, "pattern matcher") << "Illegal arguments";
|
||||
buf.resize(size);
|
||||
memcpy(buf.data(), buffer, size);
|
||||
pattern_id = _pattern_id;
|
||||
|
@@ -430,7 +430,9 @@ kiss_thin_nfa_exec(KissThinNFA *nfa_h, const Buffer& buf, std::vector<std::pair<
|
||||
{
|
||||
struct kiss_bnfa_runtime_s bnfa_runtime;
|
||||
|
||||
dbgAssert(nfa_h != nullptr) << "kiss_thin_nfa_exec() was called with null handle";
|
||||
dbgAssert(nfa_h != nullptr)
|
||||
<< AlertInfo(AlertTeam::CORE, "pattern matcher")
|
||||
<< "kiss_thin_nfa_exec() was called with null handle";
|
||||
|
||||
if (buf.size() == 0) {
|
||||
return;
|
||||
|
@@ -105,7 +105,7 @@ PMHook::prepare(const set<PMPattern> &inputs)
|
||||
set<PMPattern>
|
||||
PMHook::scanBuf(const Buffer &buf) const
|
||||
{
|
||||
dbgAssert(handle != nullptr) << "Unusable Pattern Matcher";
|
||||
dbgAssert(handle != nullptr) << AlertInfo(AlertTeam::CORE, "pattern matcher") << "Unusable Pattern Matcher";
|
||||
vector<pair<uint, uint>> pm_matches;
|
||||
kiss_thin_nfa_exec(handle.get(), buf, pm_matches);
|
||||
dbgTrace(D_PM) << pm_matches.size() << " raw matches found";
|
||||
@@ -121,7 +121,7 @@ PMHook::scanBuf(const Buffer &buf) const
|
||||
set<pair<uint, uint>>
|
||||
PMHook::scanBufWithOffset(const Buffer &buf) const
|
||||
{
|
||||
dbgAssert(handle != nullptr) << "Unusable Pattern Matcher";
|
||||
dbgAssert(handle != nullptr) << AlertInfo(AlertTeam::CORE, "pattern matcher") << "Unusable Pattern Matcher";
|
||||
|
||||
vector<pair<uint, uint>> pm_matches;
|
||||
kiss_thin_nfa_exec(handle.get(), buf, pm_matches);
|
||||
@@ -135,7 +135,7 @@ PMHook::scanBufWithOffset(const Buffer &buf) const
|
||||
void
|
||||
PMHook::scanBufWithOffsetLambda(const Buffer &buf, I_PMScan::CBFunction cb) const
|
||||
{
|
||||
dbgAssert(handle != nullptr) << "Unusable Pattern Matcher";
|
||||
dbgAssert(handle != nullptr) << AlertInfo(AlertTeam::CORE, "pattern matcher") << "Unusable Pattern Matcher";
|
||||
|
||||
unordered_map<uint, uint> match_counts;
|
||||
vector<pair<uint, uint>> pm_matches;
|
||||
|
Reference in New Issue
Block a user