cpython: 7625866f8127 (original) (raw)

Mercurial > cpython

changeset 81622:7625866f8127 3.2

Issue #16335: Fix integer overflow in unicode-escape decoder. [#16335]

Serhiy Storchaka storchaka@gmail.com
date Mon, 21 Jan 2013 11:38:00 +0200
parents 260a9afd999a
children 494d341e9143 f84a6c89ccbc
files Lib/test/test_ucn.py Objects/unicodeobject.c
diffstat 2 files changed, 18 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_ucn.py 16 Objects/unicodeobject.c 3

line wrap: on

line diff

--- a/Lib/test/test_ucn.py +++ b/Lib/test/test_ucn.py @@ -8,6 +8,7 @@ Modified for Python 2.0 by Fredrik Lundh """#" import unittest +import _testcapi from test import support @@ -141,6 +142,21 @@ class UnicodeNamesTest(unittest.TestCase str, b"\NSPACE", 'unicode-escape', 'strict' )

+ + def test_main(): support.run_unittest(UnicodeNamesTest)

--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3923,7 +3923,8 @@ PyObject PyUnicode_DecodeUnicodeEscape( / found a name. look it up in the unicode database */ message = "unknown Unicode character name"; s++;