Message100445
| Author |
vstinner |
| Recipients |
Arfrever, amaury.forgeotdarc, ezio.melotti, lemburg, loewis, vstinner |
| Date |
2010年03月05日.01:02:01 |
| SpamBayes Score |
5.221908e-07 |
| Marked as misclassified |
No |
| Message-id |
<1267750924.63.0.535205045403.issue6697@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is a fix for object.c (object_pyunicode_asstring-py3k.patch):
- PyObject_GenericGetAttr(): Replace PyErr_Format("... %.400s", ..., _PyUnicode_AsString(name)) by PyErr_Format("... %U", ..., name), as done in PyObject_GenericSetAttr(). Note that the string will no more be truncated to 400 bytes
- PyObject_GetAttr(), PyObject_SetAttr(): Catch _PyUnicode_AsString() error
It fixes the crash getattr(1, "\uDAD1\uD51E") (used as a test in the patch). |
|