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
e1990590e3
commit
f4e26adefc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205574
@ -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…
Reference in New Issue
Block a user