On Thu, Jul 29, 2010 at 8:47 PM, victor.stinner <python-checkins at python.org> wrote: .. > + res = PyUnicode_DecodeFSDefault(PyBytes_AsString(bytes)); Shouldn't you check return value of PyBytes_AsString before passing it to PyUnicode_DecodeFSDefault?