On Sun, Oct 09, 2005 at 08:04:55AM -0400, Jeff Trawick wrote:
> Any concerns about the attached patch?   Just make the app change if
> it needs to be tested with Purify and leave APR alone?

I think it's correct to fix this in APR, any standard I read requires 
that envp is a NULL-terminated array of char *pointers, which current 
APR behaviour does not satisfy.  +1 to the patch

> Index: threadproc/unix/proc.c
> ===================================================================
> --- threadproc/unix/proc.c    (revision 307403)
> +++ threadproc/unix/proc.c    (working copy)
> @@ -292,7 +292,12 @@
>                                            apr_pool_t *pool)
>  {
>      int i;
> +    const char * const empty_envp[] = {NULL};
>  
> +    if (!env) { /* Purify doesn't like NULL passed to execve() */
> +        env = empty_envp;
> +    }
> +
>      new->in = attr->parent_in;
>      new->err = attr->parent_err;
>      new->out = attr->parent_out;
> 

Reply via email to