]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #8793: Prevent IDLE crash in 2.7 when given strings with
authorNed Deily <nad@acm.org>
Wed, 16 Nov 2011 02:29:02 +0000 (18:29 -0800)
committerNed Deily <nad@acm.org>
Wed, 16 Nov 2011 02:29:02 +0000 (18:29 -0800)
invalid hex escape sequences.

Lib/idlelib/ScriptBinding.py
Misc/NEWS

index 1139b30784947d7aa6b2b3015b86c8fe46b63932..4c6dc82e0f89854f6c6fabdb85ee0d46abfecd5e 100644 (file)
@@ -101,7 +101,7 @@ class ScriptBinding:
             try:
                 # If successful, return the compiled code
                 return compile(source, filename, "exec")
-            except (SyntaxError, OverflowError), err:
+            except (SyntaxError, OverflowError, ValueError), err:
                 try:
                     msg, (errorfilename, lineno, offset, line) = err
                     if not errorfilename:
index 8d37ca52abacd693098234e48295cbfe904527b6..a208309ddf3823b457571ec7ae470b2748aeab70 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -79,6 +79,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #8793: Prevent IDLE crash when given strings with invalid hex escape
+  sequences.
+
 - Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
   handles non-valid attributes, including adjacent and unquoted attributes.