diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-07 02:17:30 +0000 |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-07 02:17:30 +0000 |
commit | fd00916c2e460a8cf16acc46409469d19bc48805 (patch) | |
tree | e414361f66c3713c6eb0c7f48be0fcd5d56154ca /Python/import.c | |
parent | 23a736a4f06cabf9c1f1b57fd6bd7b4fabc8ca08 (diff) | |
download | cpython-git-fd00916c2e460a8cf16acc46409469d19bc48805.tar.gz |
Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun.
Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in
debug mode. What happens is the unicode string u'\U000abcde' with a length
of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is
reserved in the buffer, a buffer overrun occurs.
Diffstat (limited to 'Python/import.c')
0 files changed, 0 insertions, 0 deletions