Rémi Bernon : kernelbase: Fix incorrect pseudo console allocation size (GCC 11).

Alexandre Julliard julliard at winehq.org
Mon Sep 27 15:21:43 CDT 2021


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Sep 27 10:58:29 2021 +0200

kernelbase: Fix incorrect pseudo console allocation size (GCC 11).

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index c38e8e91955..a7eeb439232 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1728,7 +1728,7 @@ HRESULT WINAPI CreatePseudoConsole( COORD size, HANDLE input, HANDLE output, DWO
 
     if (!size.X || !size.Y || !ret) return E_INVALIDARG;
 
-    if (!(pseudo_console = HeapAlloc( GetProcessHeap(), 0, HEAP_ZERO_MEMORY ))) return E_OUTOFMEMORY;
+    if (!(pseudo_console = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pseudo_console) ))) return E_OUTOFMEMORY;
 
     swprintf( pipe_name, ARRAY_SIZE(pipe_name),  L"\\\\.\\pipe\\wine_pty_signal_pipe%x",
               GetCurrentThreadId() );




More information about the wine-cvs mailing list