Commit 3b6b2107 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

shell32: Fix a buffer overflow in CommandLineToArgvW().

parent 1262f076
......@@ -227,15 +227,20 @@ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs)
if (*s)
s++;
}
/* close the argument */
/* close the executable path */
*d++=0;
/* skip to the first argument and initialize it if any */
while (*s==' ' || *s=='\t')
s++;
if (*s)
argv[argc++]=d;
if (!*s)
{
/* There are no parameters so we are all done */
*numargs=argc;
return argv;
}
/* Split and copy the remaining arguments */
argv[argc++]=d;
qcount=bcount=0;
while (*s)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment