]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
PyUnicode_Join() checks output length in debug mode
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Oct 2011 21:36:02 +0000 (23:36 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Oct 2011 21:36:02 +0000 (23:36 +0200)
commit9ce5a835bbb33c8a7f22e8ab4c6c226ecb27b0be
tree7f91e204d547fc86c83298daf3b672e18cb43af8
parentb80389535581300295758f3a9b50e9628b77ae3c
PyUnicode_Join() checks output length in debug mode

PyUnicode_CopyCharacters() may copies less character than requested size, if
the input string is smaller than the argument. (This is very unlikely, but who
knows!?)

Avoid also calling PyUnicode_CopyCharacters() if the string is empty.
Objects/unicodeobject.c