msvcrt: fix crash in _execl

Dmitry Timoshkov dmitry at codeweavers.com
Sat Jul 22 23:52:46 CDT 2006


Louis. Lenders <xerox_xerox2000 at yahoo.co.uk> wrote:

> @@ -225,9 +225,12 @@ MSVCRT_intptr_t CDECL _execl(const char*
>    char * args;
>    MSVCRT_intptr_t ret;
>  
> -  va_start(ap, arg0);
> -  args = msvcrt_valisttos(arg0, ap, ' ');
> -  va_end(ap);
> +  if(arg0)
> +  {
> +    va_start(ap, arg0);
> +    args = msvcrt_valisttos(arg0, ap, ' ');
> +    va_end(ap);
> +  }
>  
>    ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, NULL);
>    MSVCRT_free(args);

I wonder whether compiler was complaining that args might be used
not initialized, what is the case when arg0 is NULL.

-- 
Dmitry.



More information about the wine-devel mailing list