Marcus Meissner : netstat: Allocate WCHARs not CHARs (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Sep 30 16:07:54 CDT 2013


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Sep 29 10:52:04 2013 +0200

netstat: Allocate WCHARs not CHARs (Coverity).

---

 programs/netstat/netstat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/netstat/netstat.c b/programs/netstat/netstat.c
index fab39e3..0e52c36 100644
--- a/programs/netstat/netstat.c
+++ b/programs/netstat/netstat.c
@@ -90,7 +90,7 @@ static int __cdecl NETSTAT_wprintf(const WCHAR *format, ...)
      */
 
     if (!output_bufW) output_bufW = HeapAlloc(GetProcessHeap(), 0,
-                                              MAX_WRITECONSOLE_SIZE);
+                                              MAX_WRITECONSOLE_SIZE*sizeof(WCHAR));
     if (!output_bufW) {
         WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n");
         return 0;




More information about the wine-cvs mailing list