From e6728252a3598527bbda15c7ee17e03bf2c448f1 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 5 Sep 2006 13:19:18 +0000 Subject: [PATCH] [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 --- Lib/pdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pdb.py b/Lib/pdb.py index 83884d7987f..dfa6fc8246e 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: