André Hentschel : winebrowser: Fix allocation count ( Coverity).
Module: wine Branch: master Commit: 1c1c99ff23d16b07ea394c999eb530c0c072aa9f URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c1c99ff23d16b07ea394c999e... Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jan 15 15:17:43 2017 +0100 winebrowser: Fix allocation count (Coverity). Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winebrowser/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c index 4ec1d14..304ac14 100644 --- a/programs/winebrowser/main.c +++ b/programs/winebrowser/main.c @@ -82,7 +82,7 @@ static int launch_app( const WCHAR *candidates, const WCHAR *argv1 ) { 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] ); argv_new[count] = cmdline; argv_new[count + 1] = NULL;
participants (1)
-
Alexandre Julliard