Permalink
Browse files

46_CVE-2009-0315

  • Loading branch information...
1 parent bbc7f2a commit 994c9b697cac45cb029c4b4025b82051fa592b9f Nico Golde committed with youknowone Jun 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 plugins/python/python.c
View
@@ -1138,6 +1138,7 @@ Plugin_New(char *filename, PyMethodDef *xchat_methods, PyObject *xcoobj)
}
PySys_SetArgv(1, argv);
+ PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)");
PySys_SetObject("__plugin__", (PyObject *) plugin);
/* Set stdout and stderr to xchatout. */
@@ -2160,6 +2161,7 @@ xchat_plugin_init(xchat_plugin *plugin_handle,
Py_SetProgramName("xchat");
Py_Initialize();
PySys_SetArgv(1, argv);
+ PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)");
Plugin_Type.ob_type = &PyType_Type;
Context_Type.ob_type = &PyType_Type;

0 comments on commit 994c9b6

Please sign in to comment.