зеркало из https://github.com/github/ruby.git
Fix Use-After-Free issue for Regexp
Co-authored-by: Isaac Peka <7493006+isaac-peka@users.noreply.github.com>
This commit is contained in:
Родитель
7227b859a7
Коммит
c38fc1bb36
|
@ -3435,8 +3435,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||||
CASE(OP_MEMORY_END_PUSH_REC) MOP_IN(OP_MEMORY_END_PUSH_REC);
|
CASE(OP_MEMORY_END_PUSH_REC) MOP_IN(OP_MEMORY_END_PUSH_REC);
|
||||||
GET_MEMNUM_INC(mem, p);
|
GET_MEMNUM_INC(mem, p);
|
||||||
STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
|
STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
|
||||||
STACK_PUSH_MEM_END(mem, s);
|
|
||||||
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
|
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
|
||||||
|
STACK_PUSH_MEM_END(mem, s);
|
||||||
MOP_OUT;
|
MOP_OUT;
|
||||||
JUMP;
|
JUMP;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче