#! /bin/sh /usr/share/dpatch/dpatch-run ## 46_CVE-2009-0315.dpatch by Nico Golde ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad xchat-2.8.6~/plugins/python/python.c xchat-2.8.6/plugins/python/python.c --- xchat-2.8.6~/plugins/python/python.c 2008-03-29 06:57:35.000000000 +0100 +++ xchat-2.8.6/plugins/python/python.c 2009-02-05 19:13:02.000000000 +0100 @@ -1106,6 +1106,7 @@ } 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. */ @@ -2110,6 +2111,7 @@ 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;