Paul Gofman : ntdll: Fix allocation size in grow_logical_proc_ex_buf().
Alexandre Julliard
julliard at winehq.org
Mon May 16 15:37:57 CDT 2022
Module: wine
Branch: master
Commit: 6ee6076216f903a97c3686c66d076bfb39ce40f4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6ee6076216f903a97c3686c66d076bfb39ce40f4
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Tue May 3 16:28:09 2022 -0500
ntdll: Fix allocation size in grow_logical_proc_ex_buf().
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/system.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 65c49b6ccd1..64829559c1d 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -590,8 +590,8 @@ static BOOL grow_logical_proc_ex_buf( SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX **
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *new_dataex;
DWORD new_len = *max_len * 2;
- if (!(new_dataex = realloc( *pdataex, new_len * sizeof(*new_dataex) ))) return FALSE;
- memset( new_dataex + *max_len, 0, (new_len - *max_len) * sizeof(*new_dataex) );
+ if (!(new_dataex = realloc( *pdataex, new_len ))) return FALSE;
+ memset( (char *)new_dataex + *max_len, 0, new_len - *max_len );
*pdataex = new_dataex;
*max_len = new_len;
return TRUE;
More information about the wine-cvs
mailing list