Fix incorrectly sized buffer.

This commit is contained in:
Mike McCormack 2003-10-30 23:06:10 +00:00 committed by Alexandre Julliard
parent c922278bfa
commit 6a83224eb3
1 changed files with 1 additions and 1 deletions

View File

@ -1484,7 +1484,7 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
if (!(ret = cmdline) || !cmdline[0])
{
/* no command-line, create one */
if ((ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(appname) + 3) + sizeof(WCHAR) )))
if ((ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(appname) + 3) * sizeof(WCHAR) )))
sprintfW( ret, quotesW, appname );
}
return ret;