]> granicus.if.org Git - python/commit
Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
authorWalter Dörwald <walter@livinglogic.de>
Fri, 24 Oct 2003 14:25:28 +0000 (14:25 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Fri, 24 Oct 2003 14:25:28 +0000 (14:25 +0000)
commit4894c306266b5fb3a6cf8429cbb6bc31d3e23e4e
treecb49811c63b1b476a07c19af8d8ab6f5d84ab3aa
parent6a5b02774284c20d6860edc16157cb99a0c0b3ca
Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
charmaptranslate_makespace() allocated more memory than required for the
next replacement but didn't remember that fact, so memory size was growing
exponentially every time a replacement string is longer that one character.
This fixes SF bug #828737.
Lib/test/test_codeccallbacks.py
Objects/unicodeobject.c