From: Ned Deily Date: Wed, 16 Nov 2011 02:29:02 +0000 (-0800) Subject: Issue #8793: Prevent IDLE crash in 2.7 when given strings with X-Git-Tag: v2.7.3rc1~300 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=174c4f897fd05b8f838cb4db928295f23ab4b033;p=thirdparty%2FPython%2Fcpython.git Issue #8793: Prevent IDLE crash in 2.7 when given strings with invalid hex escape sequences. --- diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index 1139b3078494..4c6dc82e0f89 100644 --- a/Lib/idlelib/ScriptBinding.py +++ b/Lib/idlelib/ScriptBinding.py @@ -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: diff --git a/Misc/NEWS b/Misc/NEWS index 8d37ca52abac..a208309ddf38 100644 --- 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.