]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: pattern: do not index too large strings using the tree
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Nov 2026 10:20:55 +0000 (11:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 25 Nov 2026 10:33:05 +0000 (11:33 +0100)
commit60904f86938435af8d8d129dd1f02606ac074b4e
tree1d4dc75d78c85b3537cb7399fbc505c8d145f1d4
parentfc0068e70cb66bb4d3078a1e724f078c314476c7
BUG/MINOR: pattern: do not index too large strings using the tree

In pat_idx_tree_str(), we have to fall back to the list also when
trying to index strings that are larger than the encoded bit depth,
i.e. 4095 bytes including the trailing zero. Anyway at such lengths
there cannot be that many strings (due to memory usage) and lists
will probably not be much more expensive than trees.

This needs to be backported to all versions.
src/pattern.c