Alexander Belopolsky added the comment: I tried to produce a buffer overflow in get_parent (import.c), but an attempt to import a module with non-ascii characters is aborted in getargs.c before get_parent is reached:
>>> __import__("\u0080xyz") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __import__() argument 1 must be string without null bytes, not str This looks like a bug. At the very least the error message is misleading because there are no null bytes in "\u0080xyz" string. The offending code is if ((Py_ssize_t)strlen(*p) != PyUnicode_GetSize(arg)) return converterr("string without null bytes", arg, msgbuf, bufsize); at getargs.c:826 However, given the preceding "XXX WAAAAH!" comment, this is probably a sign of not yet implemented feature rather than a bug. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1950> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com