bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875) (GH-20919)

(cherry picked from commit 51c5896b62)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-06-16 10:36:59 -07:00 committed by GitHub
parent 3cf809475a
commit 7795ae8f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View file

@ -669,7 +669,7 @@ FSTRINGS_TRACEBACKS = {
{a$b}
'''
""",
'(a$b)',
'(a$b)\n',
),
'multiline_fstring_brace_on_next_line': (
"""
@ -677,7 +677,7 @@ FSTRINGS_TRACEBACKS = {
{a$b
}'''
""",
'(a$b',
'(a$b\n',
),
'multiline_fstring_brace_on_previous_line': (
"""
@ -685,7 +685,7 @@ FSTRINGS_TRACEBACKS = {
{
a$b}'''
""",
'a$b)',
'a$b)\n',
),
}