rose: check literal bounds when building SB table

Literals that cannot lead to a report in the first ROSE_SMALL_BLOCK_LEN
bytes may be dropped from the small block table.
This commit is contained in:
Justin Viiret
2016-07-07 10:25:49 +10:00
committed by Matthew Barr
parent 9346a9090e
commit 39c6a0c7bf
3 changed files with 133 additions and 31 deletions

View File

@@ -44,8 +44,14 @@ namespace ue2 {
struct hwlmLiteral;
/**
* \brief Build up a vector of literals for the given table.
*
* If max_offset is specified (and not ROSE_BOUND_INF), then literals that can
* only lead to a pattern match after max_offset may be excluded.
*/
std::vector<hwlmLiteral> fillHamsterLiteralList(const RoseBuildImpl &build,
rose_literal_table table);
rose_literal_table table, u32 max_offset = ROSE_BOUND_INF);
aligned_unique_ptr<HWLM> buildFloatingMatcher(const RoseBuildImpl &build,
rose_group *fgroups,