mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
- Patch #1541585: fix buffer overrun when performing repr() on
a unicode string in a build with wide unicode (UCS-4) support. I will forward port to 2.6. Can someone backport to 2.4?
This commit is contained in:
parent
bebdc9e52c
commit
19c35bba5d
4 changed files with 37 additions and 12 deletions
|
|
@ -92,6 +92,10 @@ class UnicodeTest(
|
|||
"\\xfe\\xff'")
|
||||
testrepr = repr(u''.join(map(unichr, xrange(256))))
|
||||
self.assertEqual(testrepr, latin1repr)
|
||||
# Test repr works on wide unicode escapes without overflow.
|
||||
self.assertEqual(repr(u"\U00010000" * 39 + u"\uffff" * 4096),
|
||||
repr(u"\U00010000" * 39 + u"\uffff" * 4096))
|
||||
|
||||
|
||||
def test_count(self):
|
||||
string_tests.CommonTest.test_count(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue