From f4541b682682c48b117789e5770c6ab8c021d992 Mon Sep 17 00:00:00 2001 From: Nico Golde Date: Wed, 13 Jun 2012 10:26:52 +0900 Subject: [PATCH 08/12] 46_CVE-2009-0315 --- plugins/python/python.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/plugins/python/python.c b/plugins/python/python.c index fd68208..fcbe992 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -1128,6 +1128,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. */ @@ -2150,6 +2151,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; -- 1.7.7.5 (Apple Git-26)