=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: winebrowser: Fix allocation count ( Coverity).

Alexandre Julliard julliard at winehq.org
Mon Jan 16 15:48:49 CST 2017


Module: wine
Branch: master
Commit: 1c1c99ff23d16b07ea394c999eb530c0c072aa9f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1c1c99ff23d16b07ea394c999eb530c0c072aa9f

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Jan 15 15:17:43 2017 +0100

winebrowser: Fix allocation count (Coverity).

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at 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;




More information about the wine-cvs mailing list