vuln bugfix: check for swig_runtime_dataN.py was not done properly (MSVR-11-0084)

The bug is due to the following faulty line: http://code.google.com/p/idapython/source/browse/tags/build-1.5.1/swig/idaapi.i#611
This commit is contained in:
elias.bachaalany@gmail.com 2011-07-27 08:51:29 +00:00
parent 8413f9f791
commit 7bd77d534c
2 changed files with 37 additions and 41 deletions

View File

@ -42,7 +42,7 @@
// Python-style version tuple comes from the makefile
// Only the serial and status is set here
#define VER_SERIAL 0
#define VER_SERIAL 3
#define VER_STATUS "final"
#define IDAPYTHON_RUNSTATEMENT 0
#define IDAPYTHON_ENABLE_EXTLANG 3

View File

@ -1124,13 +1124,11 @@ struct py_add_del_menu_item_ctx
//------------------------------------------------------------------------
const char *pywraps_check_autoscripts()
{
#define STRING1(x) #x
#define STRING2(x) STRING1(x)
static const char *exts[] = {"py", "pyw", "pyc", "pyo"};
static const char *fns[] =
{
"swig_runtime_data" STRING2(SWIG_RUNTIME_VERSION),
"swig_runtime_data" SWIG_RUNTIME_VERSION,
"sitecustomize",
"usercustomize"
};
@ -1146,8 +1144,6 @@ const char *pywraps_check_autoscripts()
}
}
return NULL;
#undef STRING1
#undef STRING2
}
//------------------------------------------------------------------------
@ -1178,7 +1174,7 @@ bool init_pywraps()
char dtor_name[MAXSTR];
qsnprintf(dtor_name, sizeof(dtor_name), "%s.dtor", S_PY_IDC_OPAQUE_T);
// register the dtor function
// Register the dtor function
if ( !set_idc_func_ex(dtor_name, py_idc_opaque_dtor, py_idc_cvt_helper_dtor_args, 0) )
return false;