HomePhabricator

* Add our own copy of the string library, slightly patched to run hook…

Authored by tstarling.

Description

  • Add our own copy of the string library, slightly patched to run hook functions during recursive match() operations. This avoids a request/emergency timeout for e.g. string.rep('x', 1000000):find('x*y'), which is O(N^2). Patch included. * Include LUA_MASKCOUNT in the hook mask so that the hook will run after each instruction, not just each line. The exploit scenarios for this one are rather arcane since a one-line loop triggers the line hook on each iteration, but it couldn't hurt to fix it.

Details

Committed
tstarlingMay 25 2012, 7:01 AM
Parents
rMLUS4254d9805abc: Fix for r115085: global destruction in MSHUTDOWN is unnecessary when you have…
Branches
Unknown
Tags
Unknown
ChangeId
None