If lparam is null, the current code crashes when it hits the memcpy in pack_user_message.
From: Tim Clem tclem@codeweavers.com
--- dlls/win32u/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index d15f9af3f9f..d2909339983 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -1691,7 +1691,7 @@ size_t user_message_size( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, size = sizeof(STYLESTRUCT); break; case WM_GETDLGCODE: - size = sizeof(MSG); + if (lparam) size = sizeof(MSG); break; case SBM_SETSCROLLINFO: case SBM_GETSCROLLINFO:
The fix looks good, but it would be nice to have a test. Please include something like the [attached test](/uploads/4ff2f549a3d6edd1d7076f2968c584e2/patch.diff).