From: Guido van Rossum Date: Fri, 12 Feb 1999 14:13:10 +0000 (+0000) Subject: Fix by Chris Petrilli (to his own code) to limit the number of X-Git-Tag: v1.5.2b2~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c;p=thirdparty%2FPython%2Fcpython.git Fix by Chris Petrilli (to his own code) to limit the number of iterations looking for expansions to 10. --- diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index bc646e41e2bc..dd8b6d866726 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -209,7 +209,9 @@ class ConfigParser: return rawval value = rawval # Make it a pretty variable name - while 1: # Loop through this until it's done + depth = 0 + while depth < 10: # Loop through this until it's done + depth = depth + 1 if not string.find(value, "%("): try: value = value % d