Visitar URL original
gh-103824: fix use-after-free error in Parser/tokenizer.c by chgnrdv · Pull Request #103993 · python/cpython · GitHub
Skip to content
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