Author rmccampbell7
Recipients rmccampbell7
Date 2019-07-10.05:07:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org>
In-reply-to
Content
The ctypes.create_string_buffer function uses the length of the string to create the buffer if no size is provided. Since windows wide chars are UTF-16 the buffer may actually need to be larger to store surrogate pairs. This code crashes on windows:

>>> create_unicode_buffer('\U00010000\U00010000')
ValueError: string too long
History
Date User Action Args
2019-07-10 05:07:40rmccampbell7setrecipients: + rmccampbell7
2019-07-10 05:07:40rmccampbell7setmessageid: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org>
2019-07-10 05:07:40rmccampbell7linkissue37536 messages
2019-07-10 05:07:40rmccampbell7create