Rafał Dowgird added the comment:
The buffer output of the script suggests that the part after the '\000' has not
been copied into the array at all. If that's the case, then the 'raw' output
wouldn't print it anyway.
--
___
Rafał Dowgird added the comment:
Attaching output of the script. 'x\000y\000' becomes 'x' after assigning to a
char array.
--
Added file: http://bugs.python.org/file22921/output.txt
___
Python tracker
<http://bug
New submission from Rafał Dowgird :
The ctypes module seems to truncate NUL-containing strings when assigning to
structure fields of type c_char*1024. Reproduced on a 2.7.2 compiled from
tarball. Script to reproduce attached.
--
components: ctypes
files: reproduce.py
messages: 142274