Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-103824: fix use-after-free error in Parser/tokenizer.c #103993

Merged
merged 5 commits into from
May 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Parser/tokenizer.c
  • Loading branch information
pablogsal authored May 1, 2023
commit b198bc8ccaaedf91dd032c7f590f54dfafe8ac59
3 changes: 2 additions & 1 deletion Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2552,8 +2552,9 @@ tok_get_fstring_mode(struct tok_state *tok, tokenizer_mode* current_tok, struct
while (end_quote_size != current_tok->f_string_quote_size) {
int c = tok_nextc(tok);
if (c == EOF || (current_tok->f_string_quote_size == 1 && c == '\n')) {
if (tok->decoding_erred)
if (tok->decoding_erred) {
return MAKE_TOKEN(ERRORTOKEN);
}

assert(tok->multi_line_start != NULL);
// shift the tok_state's location into
Expand Down