Module: wine Branch: stable Commit: 38d64fdb129c7e7ddb5aac0e549c84be41341e49 URL: https://source.winehq.org/git/wine.git/?a=commit;h=38d64fdb129c7e7ddb5aac0e5...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 26 15:31:21 2020 +0100
user.exe: Clear out the thunk array to catch invalid winprocs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48814 Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 64bd952b85eb183d97b438a3d2695b2bf78d17ea) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/user.exe16/message.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c index 14e7a19889..e3ca3fd779 100644 --- a/dlls/user.exe16/message.c +++ b/dlls/user.exe16/message.c @@ -152,7 +152,8 @@ static WNDPROC16 alloc_win16_thunk( WNDPROC handle ) { assert( MAX_WINPROCS16 * sizeof(WINPROC_THUNK) <= 0x10000 );
- if (!(thunk_selector = GlobalAlloc16( GMEM_FIXED, MAX_WINPROCS16 * sizeof(WINPROC_THUNK) ))) + if (!(thunk_selector = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT, + MAX_WINPROCS16 * sizeof(WINPROC_THUNK) ))) return NULL; PrestoChangoSelector16( thunk_selector, thunk_selector ); thunk_array = GlobalLock16( thunk_selector );