summaryrefslogtreecommitdiff
path: root/recipes/xchat/files/46_CVE-2009-0315.dpatch
blob: 97bd442279a879fb7dcc5384c636c68b17cff610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh /usr/share/dpatch/dpatch-run
## 46_CVE-2009-0315.dpatch by Nico Golde <nion@debian.org>
##
## 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;