https://bugs.winehq.org/show_bug.cgi?id=49414
Bug ID: 49414 Summary: DefWindowProcW doesn't handle WIN_GetPtr properly when handling WM_GETTEXTLENGTH Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: gabravier@gmail.com Distribution: ---
case WM_GETTEXTLENGTH: { WND *wndPtr = WIN_GetPtr( hwnd ); if (wndPtr && wndPtr->text) result = (LRESULT)strlenW(wndPtr->text); WIN_ReleasePtr( wndPtr ); } break;
(from dlls/user32/defwnd.c:998)
WIN_GetPtr can return WND_OTHER_PROCESS, which this code does not check for (for example, dlls/user32/defwnd.c:550 checks for it properly). A lot of other code in defwnd.c doesn't check for it, so it looks like having a window be valid for another process could cause problems.
https://bugs.winehq.org/show_bug.cgi?id=49414
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Alexandre Julliard julliard@winehq.org --- That's already checked at the top of the function.
https://bugs.winehq.org/show_bug.cgi?id=49414
--- Comment #2 from Gabriel Ravier gabravier@gmail.com --- Oh, I'm blind ????. I should have paid more attention to what exactly that code was doing. Welp, sorry for filing a stupid bug report like that ????.
https://bugs.winehq.org/show_bug.cgi?id=49414
--- Comment #3 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=49414
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Austin English austinenglish@gmail.com --- Closing.