summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-02-12 14:13:10 (GMT)
committerGuido van Rossum <guido@python.org>1999-02-12 14:13:10 (GMT)
commit72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c (patch)
treebb12de82612eed9d1119da5a086b9d38c9162371 /Lib/ConfigParser.py
parent561df2443727086e1228bfb4c6f3d3211262599b (diff)
downloadcpython-72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c.zip
cpython-72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c.tar.gz
cpython-72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c.tar.bz2
Fix by Chris Petrilli (to his own code) to limit the number of
iterations looking for expansions to 10.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index bc646e4..dd8b6d8 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