The nargvstr and nenvstr properties of arginfo are ints, not longs,
so should be copied to userspace with suword32() instead of suword(). This alleviates problems on 64-bit big-endian architectures, and is a no-op on all 32-bit architectures. Tested on: amd64, sparc64, powerpc64
This commit is contained in:
parent
3d3046680b
commit
32325226c5
@ -1260,7 +1260,7 @@ exec_copyout_strings(imgp)
|
||||
* Fill in "ps_strings" struct for ps, w, etc.
|
||||
*/
|
||||
suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp);
|
||||
suword(&arginfo->ps_nargvstr, argc);
|
||||
suword32(&arginfo->ps_nargvstr, argc);
|
||||
|
||||
/*
|
||||
* Fill in argument portion of vector table.
|
||||
@ -1276,7 +1276,7 @@ exec_copyout_strings(imgp)
|
||||
suword(vectp++, 0);
|
||||
|
||||
suword(&arginfo->ps_envstr, (long)(intptr_t)vectp);
|
||||
suword(&arginfo->ps_nenvstr, envc);
|
||||
suword32(&arginfo->ps_nenvstr, envc);
|
||||
|
||||
/*
|
||||
* Fill in environment portion of vector table.
|
||||
|
Loading…
x
Reference in New Issue
Block a user