public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de700a5
)
execve: Use ugets for copying argument 0 to udata
author
Tormod Volden
<debian.tormod@gmail.com>
Wed, 3 Jun 2015 19:56:18 +0000
(21:56 +0200)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 3 Jun 2015 21:26:46 +0000
(22:26 +0100)
The argument list gets squeezed in at the process memory top,
and if it is short, copying all 8 bytes might read above top.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/syscall_exec16.c
patch
|
blob
|
history
diff --git
a/Kernel/syscall_exec16.c
b/Kernel/syscall_exec16.c
index
a1d42ad
..
6575c15
100644
(file)
--- a/
Kernel/syscall_exec16.c
+++ b/
Kernel/syscall_exec16.c
@@
-210,7
+210,7
@@
arg_t _execve(void)
nenvp = wargs((char *) (nargv), ebuf, NULL);
// Fill in udata.u_name with Program invocation name
- uget((void *) ugetw(nargv), udata.u_name, 8);
+ uget
s
((void *) ugetw(nargv), udata.u_name, 8);
memcpy(udata.u_ptab->p_name, udata.u_name, 8);
brelse(abuf);