summaryrefslogtreecommitdiff
path: root/threadproc/unix
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-09-15 21:07:34 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-09-15 21:07:34 +0000
commit9a0d8caa8a9392facedd6f77a0867ffd555a0e37 (patch)
tree389e3f5bcf82828cb588dc8faac95c77094851bc /threadproc/unix
parentc438999ff275a186749340859b15904433023cc3 (diff)
downloadlibapr-9a0d8caa8a9392facedd6f77a0867ffd555a0e37.tar.gz
Fix a bug in apr_create_process() for Unix. The NULL signifying
the end of the parameters to execve() was stored in the wrong location, overlaying the storage beyond the newargs[] array and also passing uninitialized storage to execve(), which would sometimes fail with EFAULT. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60532 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/unix')
-rw-r--r--threadproc/unix/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 6d7d0f5b0..5d21eeb02 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -331,7 +331,7 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname,
newargs[i + 2] = args[i];
i++;
}
- newargs[i + 3] = NULL;
+ newargs[i + 2] = NULL;
if (attr->detached) {
apr_detach();
}