]> git.ipfire.org Git - thirdparty/vectorscan.git/commit
Fix noodle SVE2 off by one bug (#309)
authorypicchi-arm <67330153+ypicchi-arm@users.noreply.github.com>
Mon, 5 Aug 2024 06:42:56 +0000 (07:42 +0100)
committerGitHub <noreply@github.com>
Mon, 5 Aug 2024 06:42:56 +0000 (09:42 +0300)
commitaa4bc24439a0a9aded58241dea7cf8d14bbc890c
tree80fa8a8942a3be82d72e5dbb4a14faca7a59307d
parent6c8e33e59712b4a2b46447b529af9afa2ea93a4d
Fix noodle SVE2 off by one bug (#309)

By using svmatch on 16 bit lanes with a 8 bit predicate, we end up
including an undefined character in the pattern checks. The inactive
lane after load contains an undefined value, usually \0. Patterns
using \0 as the last character would then match this spurious
character, returning a match beyond the buffer's end. The fix checks
for such matches and rejects them.

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>
src/hwlm/noodle_engine_sve.hpp