Commit f4258aa
authored
[Bug #20886] Avoid double-free in regex timeout after stack_double (ruby#12063)
Fix regex timeout double-free after stack_double
As of 1057485, it's possible to crash
on a double free due to `stk_alloc` AKA `msa->stack_p` being freed
twice, once at the end of match_at and a second time in `FREE_MATCH_ARG`
in the parent caller.
Fixes [Bug #20886]1 parent a51a6bf commit f4258aa
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4217 | 4217 | | |
4218 | 4218 | | |
4219 | 4219 | | |
| 4220 | + | |
4220 | 4221 | | |
4221 | | - | |
4222 | | - | |
4223 | 4222 | | |
4224 | 4223 | | |
4225 | 4224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1838 | 1838 | | |
1839 | 1839 | | |
1840 | 1840 | | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
1841 | 1848 | | |
1842 | 1849 | | |
1843 | 1850 | | |
| |||
0 commit comments