Skip to content

Commit

Permalink
Fix Use-After-Free issue for Regexp
Browse files Browse the repository at this point in the history
Co-authored-by: Isaac Peka <[email protected]>
  • Loading branch information
2 people authored and nurse committed Apr 22, 2024
1 parent 7227b85 commit c38fc1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
GET_MEMNUM_INC(mem, p);
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);
STACK_PUSH_MEM_END(mem, s);
MOP_OUT;
JUMP;

Expand Down

0 comments on commit c38fc1b

Please sign in to comment.