You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nameargspattern = re.compile(
r'\s*(?P<name>\b[\w$]+\b)\s*(@\(@\s*(?P<args>[\w\s,]*)\s*@\)@|)\s*((result(\s*@\(@\s*(?P<result>\b[\w$]+\b)\s*@\)@|))|(bind\s*@\(@\s*(?P<bind>.*)\s*@\)@))*\s*\Z', re.I)
This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '@)@bind@(@'.
CodeQL
The text was updated successfully, but these errors were encountered:
It occurs to me that probably the issue is the .* in (bind\s*@\(@\s*(?P<bind>.*)\s*@\)@).
I have essentially no knowledge of FORTRAN, so I feel pretty far out of my depth here, but I assume what's going on here is that the .* can reach forward arbitrarily far, including through subsequent @)@bind@(@. Probably there's some sort of negative lookahead that could be done here to prevent this problem.
In
crackfortran.py
line 938.The text was updated successfully, but these errors were encountered: