]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the
authorGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 18:50:21 +0000 (18:50 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 18:50:21 +0000 (18:50 +0000)
commit2023c9b84a08f96a8786c8e87625b00074de21a2
tree3fa1fd400cf04a2084fe12e42f55c91e69b227fa
parent8b1a6d694fa2f38cde77892c5ee0bb177be49db6
Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the
wrong thing for a unicode subclass when there were zero string
replacements.  The example given in the SF bug report was only one way
to trigger this; replacing a string of length >= 2 that's not found is
another.  The code would actually write outside allocated memory if
replacement string was longer than the search string.

(I wonder how many more of these are lurking?  The unicode code base
is full of wonders.)

Bugfix candidate; this same bug is present in 2.2.1.
Lib/test/test_unicode.py
Objects/unicodeobject.c