Skip to content

LRE fixes#1377

Open
saghul wants to merge 2 commits intomasterfrom
worktree-lre-fixes
Open

LRE fixes#1377
saghul wants to merge 2 commits intomasterfrom
worktree-lre-fixes

Conversation

@saghul
Copy link
Contributor

@saghul saghul commented Mar 3, 2026

  • Validate save index in lre_exec_backtrack
  • Validate opcodes in lre_byte_swap

saghul added 2 commits March 3, 2026 21:33
Fixes: #1375

Replace assert() with runtime check for REOP_save_start/REOP_save_end/
REOP_save_reset capture indices.

Also add lre-test with a test for this issue, and the starting point for
more lre tests.
Fixes: #1376

Check that opcode bytes are < REOP_COUNT before indexing into the
reopcode_info array.

Also change lre_byte_swap to return int (-1 on error, 0 on success)
instead of aborting, and handle the error gracefully.
@saghul saghul force-pushed the worktree-lre-fixes branch from 5ae4562 to 561d927 Compare March 3, 2026 20:33
@saghul
Copy link
Contributor Author

saghul commented Mar 3, 2026

@bnoordhuis Can you PTAL? I added the extra error constant and checking, plus handling of lre_byte_swap errors that I had missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants