Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51583 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/user32/tests/msg.c | 3 +++ dlls/user32/winproc.c | 2 ++ 2 files changed, 5 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 9867e319d58..3be5ccfd651 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -15981,6 +15981,9 @@ static void test_desktop_winproc(void)
DestroyWindow(hwnd);
+ /* Test invalid text with WM_SETTEXT. This must not crash. */ + SendMessageA(GetDesktopWindow(), WM_SETTEXT, 0, (LPARAM)55); + out_unregister: UnregisterClassA("TestDesktopClass", instance); } diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 81fbcab928d..00b79b3b006 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -494,6 +494,8 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg, case LB_ADDFILE: case EM_REPLACESEL: if (!lParam) ret = callback( hwnd, msg, wParam, lParam, result, arg ); + else if (IS_INTRESOURCE(lParam)) /* Check for handles/IDs similar to DEFWND_SetTextA */ + return 0; else { WCHAR *ptr, buffer[512]; -- 2.33.0