hyperscan icon indicating copy to clipboard operation
hyperscan copied to clipboard

Bug: pattern length will visit illegal address in hs_compile_lit_multi

Open ppx-ppx opened this issue 4 years ago • 1 comments

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

ppx-ppx avatar May 13 '20 08:05 ppx-ppx

Thanks. Please also refer to #205 . We've fixed this issue in coming release.

Nor7th avatar May 13 '20 09:05 Nor7th