[issue9319] segfault when searching modules with help()

Ron Adam report at bugs.python.org
Thu Jul 29 17:37:11 CEST 2010


Ron Adam <ron_adam at users.sourceforge.net> added the comment:

The error happens when Null is passed to strlen in (unicodeobject.c, line 860)

Passing NULL to a string format function is probably in the category of don't do that.

Stefans solution of checking for NULL before calling PyErr_Format looks to me to be correct.  As he notes, the same technique is used in another place.

It might be good to add a note somewhere not to pass NULL to C string format functions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9319>
_______________________________________


More information about the Python-bugs-list mailing list