1 |
voyageur 13/12/06 09:50:17 |
2 |
|
3 |
Added: windowmaker-0.95.5-bsd_crash.patch |
4 |
Log: |
5 |
Fix crash on BSD, thanks Yuta SATOH <nigoro.gentoo@×××××.com> in bug #493124 |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key C74525F2) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: windowmaker-0.95.5-bsd_crash.patch |
16 |
=================================================================== |
17 |
From: François Tigeot <ftigeot@××××××××.org> |
18 |
Date: Sat, 21 Sep 2013 10:34:51 +0000 (+0200) |
19 |
Subject: osdep_bsd.c: Fix a typo causing memory to be overwritten |
20 |
X-Git-Url: http://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/38e088314a2a4b7f8031f50eb546c22e5024bdf4 |
21 |
|
22 |
osdep_bsd.c: Fix a typo causing memory to be overwritten |
23 |
|
24 |
* When compiled on DragonFly+gcc 4.7.3, this out of bounds array element |
25 |
initialization causes an important variable to be overwritten and a |
26 |
subsequent WindowMaker crash |
27 |
|
28 |
* It was sheer luck other compilers/environments didn't exhibit any obvious |
29 |
issue so far |
30 |
--- |
31 |
|
32 |
diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c |
33 |
index 3393240..ad504ad 100644 |
34 |
--- a/src/osdep_bsd.c |
35 |
+++ b/src/osdep_bsd.c |
36 |
@@ -86,7 +86,7 @@ Bool GetCommandForPid(int pid, char ***argv, int *argc) |
37 |
mib[0] = CTL_KERN; |
38 |
mib[1] = KERN_ARGMAX; |
39 |
mib[2] = 0; |
40 |
- mib[4] = 0; |
41 |
+ mib[3] = 0; |
42 |
|
43 |
count = sizeof(argmax); |
44 |
if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1) |