]> git.kaiwu.me - haproxy.git/commit
MINOR: ist: add ist_find_outside() to find offending characters
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 10:28:25 +0000 (11:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commitb43f64659cbae88256c961c9e8e39e270901b738
treeb8641099fb50835f412e246702877033075a4524
parentcb1fa1e09dc6b683fc309b7949337bbdbfc9ffaa
MINOR: ist: add ist_find_outside() to find offending characters

For some syntax checks it's interesting to find offending characters
that are outside an interval. Unfortunately for now we only limit
outselves to searching control chars < 0x20 but that's not always
sufficient. Let's just implement a fast scan for characters outside a
range (min and max may not be more than 0x7f apart though). Just like
ist_find_range(), it reads one word at a time and finishes per byte
when found or on false positives. It's optimized for non-matching
inputs.
include/import/ist.h