http://bugs.winehq.org/show_bug.cgi?id=12902 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bunglehead(a)gmail.com --- Comment #2 from Nikolay Sivov <bunglehead(a)gmail.com> 2008-05-10 12:23:32 --- (In reply to comment #1)
diff --git a/dlls/user32/class.c b/dlls/user32/class.c index ff0e1f8..d39350c 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -526,6 +526,13 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc ) CLASS *classPtr; HINSTANCE instance;
+ /* Fix the extra bytes value */ + if (wc->cbClsExtra < 0 || wc->cbWndExtra < 0) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return NULL; + } + if (wc->hInstance == user32_module)
This just hide actual bug I think. cbClsExtra and cbWndExtra are checked later in CLASS_RegisterClass. I think the actual problem is in hInstance which isn't null in this case (0xCCCCCCCC) so treated as valid but it isn't. Is there any way to check it properly? Such as get a list of current instance handles for current process (RegisterClass works only in calling process scope) and that passed handle is in it..or something similar -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.