intel / intel/hyperscan

Bug: pattern length will visit illegal address in hs_compile_lit_multi

Open
#238 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

in function addLitExpression:
// Ensure that our pattern isn't too long (in characters).
if (strlen(expression) > cc.grey.limitPatternLength) {
throw CompileError("Pattern length exceeds limit.");
}
the literal pattern maybe not ended with '\0', so strlen(expression) will visit the illegal address.
maybe "strlen(expression) " should change to expLength which is user defined.

please check this bug

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.