mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
osdep_bsd.c: Fix a typo causing memory to be overwritten
* When compiled on DragonFly+gcc 4.7.3, this out of bounds array element initialization causes an important variable to be overwritten and a subsequent WindowMaker crash * It was sheer luck other compilers/environments didn't exhibit any obvious issue so far
This commit is contained in:
committed by
Carlos R. Mafra
parent
267496c54c
commit
38e088314a
@@ -86,7 +86,7 @@ Bool GetCommandForPid(int pid, char ***argv, int *argc)
|
|||||||
mib[0] = CTL_KERN;
|
mib[0] = CTL_KERN;
|
||||||
mib[1] = KERN_ARGMAX;
|
mib[1] = KERN_ARGMAX;
|
||||||
mib[2] = 0;
|
mib[2] = 0;
|
||||||
mib[4] = 0;
|
mib[3] = 0;
|
||||||
|
|
||||||
count = sizeof(argmax);
|
count = sizeof(argmax);
|
||||||
if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1)
|
if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user