Skip to content

Commit 2a062f3

Browse files
committed
Rework magic data once more
The change reduces the input size on patterns using posix character classes. It is still better than reverting to the patterns from the older version, as the upstream data uses posix classes also in the later versions. The input reduction speeds up the pattern matching in some cases. This patch is functionally almost same as upstream, but might show some diff when the input is very long. While the magic data in the newer versions is functionally an improvement, with jit=0 it might show a performance regression. The slowdown is negligible in the normal usage and is still acceptable for the malicious input. If some functional regressions show up, this patch should be reverted and the tests timing should be adapted instead.
1 parent 9a2bd2f commit 2a062f3

File tree

4 files changed

+307
-3241
lines changed

4 files changed

+307
-3241
lines changed

0 commit comments

Comments
 (0)