pass a valid stack address to clone(2)
Off-by-one error: the stack address passed to clone() must be within the region allocated.
Signed-off-by Nathan Lynch <[email protected]>
--- ns_exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ns_exec.c +1 -1
@@ -272,7 +272,7 @@ int main(int argc, char *argv[])perror ("malloc" );return -1 ; } - childstack = stack + stacksize; + childstack = stack + stacksize -1 ;printf ("about to clone with %lx\n" , flags); flags |=SIGCHLD ;
Signature · 1 line
1.6.0.6
A message that is not in the archive (sent off-list or not yet received): 1251846700.23305.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]
Serge E. Hallyn
AppliedQuoted 4 lines · Nathan Lynch
Off-by-one error: the stack address passed to
clone()must be within the region allocated.Signed-off-by Nathan Lynch <[email protected]>
Applied, thanks.
Quoted 21 lines
--- ns_exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)ns_exec.c +1
-1@@ -272,7 +272,7 @@ int main(int argc, char *argv[])perror ("malloc" );return -1 ; } - childstack = stack + stacksize; + childstack = stack + stacksize -1 ;printf ("about to clone with %lx\n" , flags); flags |=SIGCHLD ;Signature · 1 line
1.6.0.6