summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-09-05 13:19:18 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-09-05 13:19:18 (GMT)
commite6728252a3598527bbda15c7ee17e03bf2c448f1 (patch)
tree6a3d187c908558286d5a0e424fa6657e7495e8d5 /Lib/pdb.py
parenta5453c48d56317c9abfd141461fd16f01274f45d (diff)
downloadcpython-e6728252a3598527bbda15c7ee17e03bf2c448f1.zip
cpython-e6728252a3598527bbda15c7ee17e03bf2c448f1.tar.gz
cpython-e6728252a3598527bbda15c7ee17e03bf2c448f1.tar.bz2
[Bug #1526834] Fix crash in pdb when you do 'b f(';
the function name was placed into a regex pattern and the unbalanced paren caused re.compile() to report an error
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 83884d7..dfa6fc8 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -23,7 +23,7 @@ __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
"post_mortem", "help"]
def find_function(funcname, filename):
- cre = re.compile(r'def\s+%s\s*[(]' % funcname)
+ cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname))
try:
fp = open(filename)
except IOError: