[docs] [issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

Krista Paasonen report at bugs.python.org
Sat Jan 9 16:28:30 EST 2016


Krista Paasonen added the comment:

Patch containing checking for buffer size, so that NULL value is the last byte as C standard specifies. Raises ValueError exception if initial value does not fit into to the buffer with NULL char.

This should decrease the possibility of creating security issues.

----------
keywords: +patch
nosy: +krista
Added file: http://bugs.python.org/file41558/create_string_buffer.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24823>
_______________________________________


More information about the docs mailing list