Message 61753 - Python tracker
I have found a few instances of the following pattern in Py3k:
char buf[MAX];
len = PyUnicode_GET_SIZE(str);
if (len >= MAX)
/* return error */
strcpy(buf, PyUnicode_AsString(str));
which could overflow if str contains non-ASCII characters. These were
probably introduced during the PyString -> PyUnicode transition. Anyway,
I got a patch that fixes (hopefully) most of these bugs.