More bugs found via sre_parse.py decompilation

This commit is contained in:
rocky
2020-02-15 05:10:11 -05:00
parent fd36c77d2d
commit 28ef04d141
6 changed files with 32 additions and 1 deletions

View File

@@ -9,7 +9,8 @@ def readline (self):
return
# From 2.4.6 sre.py
# Bug in 2.4 and 2.3 was parsing the nested "while 1" with a "break" in it
# Bug has to do with "break" not being recognized
# and is a JUMP_FORWARD.
def _parse(a, b, source, state):
while 1:
if b:
@@ -17,3 +18,29 @@ def _parse(a, b, source, state):
break
else:
raise
def _parse2(source, state):
while 1:
if a:
if b:
while 1:
this = 1
break
continue
while 1:
if b:
break
x = 3
# Bug was in 2.3 decompilation
def _parse3(source, state):
while 1:
if a:
if b:
x = 1
while 1:
if a:
break
raise