Stefan Krah added the comment:

buf[1] contains NUL if SIZE_OF_WCHAR_T is 4.

The man page says:

   size_t wcstombs(char *dest, const wchar_t *src, size_t n)

The conversion can stop for three reasons:

3.  The wide-character string has been completely converted, including the 
terminating L'\0'.  In
       this case the conversion ends in the initial state.  The number of bytes 
written to dest, exclud-
       ing the terminating '\0' byte, is returned.


To me this sounds like there cannot be an invalid write.

----------
nosy: +skrah

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15930>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to