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
5 changes: 4 additions & 1 deletion Parser/lexer/lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@ verify_identifier(struct tok_state *tok)
}
return 0;
}

Py_ssize_t invalid = _PyUnicode_ScanIdentifier(s);
if (invalid < 0) {
Py_ssize_t len = PyUnicode_GET_LENGTH(s);

if (invalid < len) {
Py_DECREF(s);
tok->done = E_ERROR;
return 0;
Expand Down
Loading