mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 11:14:06 +00:00
winebrowser: Fix allocation count (Coverity).
Signed-off-by: André Hentschel <nerv@dawncrow.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fa54b5d376
commit
1c1c99ff23
|
@ -82,7 +82,7 @@ static int launch_app( const WCHAR *candidates, const WCHAR *argv1 )
|
||||||
{
|
{
|
||||||
WCHAR **args = CommandLineToArgvW( candidates, &count );
|
WCHAR **args = CommandLineToArgvW( candidates, &count );
|
||||||
|
|
||||||
if (!(argv_new = HeapAlloc( GetProcessHeap(), 0, (count + 1) * sizeof(*argv_new) ))) break;
|
if (!(argv_new = HeapAlloc( GetProcessHeap(), 0, (count + 2) * sizeof(*argv_new) ))) break;
|
||||||
for (i = 0; i < count; i++) argv_new[i] = strdup_unixcp( args[i] );
|
for (i = 0; i < count; i++) argv_new[i] = strdup_unixcp( args[i] );
|
||||||
argv_new[count] = cmdline;
|
argv_new[count] = cmdline;
|
||||||
argv_new[count + 1] = NULL;
|
argv_new[count + 1] = NULL;
|
||||||
|
|
Loading…
Reference in a new issue