From: <wsf...@us...> - 2009-08-12 00:22:53
|
Revision: 11537 http://swig.svn.sourceforge.net/swig/?rev=11537&view=rev Author: wsfulton Date: 2009-08-12 00:22:47 +0000 (Wed, 12 Aug 2009) Log Message: ----------- Fix seg fault in SWIG_Python_ConvertFunctionPtr() for invalid values Modified Paths: -------------- trunk/Lib/python/pyrun.swg Modified: trunk/Lib/python/pyrun.swg =================================================================== --- trunk/Lib/python/pyrun.swg 2009-08-11 22:53:32 UTC (rev 11536) +++ trunk/Lib/python/pyrun.swg 2009-08-12 00:22:47 UTC (rev 11537) @@ -1163,10 +1163,10 @@ /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) { + if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) return SWIG_ERROR; - } + if (!desc) + return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |