hyperscan icon indicating copy to clipboard operation
hyperscan copied to clipboard

Literals should be able to start with NULL character

Open jobooth opened this issue 2 years ago • 3 comments

According to documentation on hs_compile_lit, "the special terminating character \0 should be allowed to appear in expression, and not treated as a terminator for a string". Recent addition of strcmp check for empty expressions invalidates this statement, specifically meaning they can no longer start with a '\0'.

This is related to issue #386, though unlike that issue, where an additional NULL terminator can be added to expressions, there is no obvious workaround for this for any expression required to start with a NULL.

jobooth avatar Mar 01 '23 12:03 jobooth

Will consider the fix, thanks for reporting.

hongyang7 avatar Mar 01 '23 14:03 hongyang7

I had the same problem

heilutan avatar Jun 14 '23 08:06 heilutan

Please fix this. As it crashes snort IDS / IPS.

See: https://lists.snort.org/pipermail/snort-users/2023-June/000543.html

Thank you

amishmm avatar Jun 23 '23 02:06 amishmm