intel / intel/hyperscan

giving pattern with null to hs_compile_lit_multi

Open
#427 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

At first I tried to use lens to hs_compile_lit_multi to indicate that null should be treated as 8 bit integer with value 0 and not as a terminator. It did not work, it ignored the lens argument and treated zero value as terminator, if it was the first character it threw an error.

I tried to use \x00 . \x worked for values that are not 00 just fine. For \x00 it did not throw exceptions even when it was at the start of the pattern, but it did not match on buffers with nulls either.

Is there a flag to force hs_compile_lit_multi to treat the input patterns as raw data and not perform any unescaping or special treatment of \xXX or \0 and just treat the lens argument as the actual lengths of the patterns?

Is there a flag to make hs_compile_lit_multi treat all escape sequences including \x00 and \0 consistently?

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.