user32: RegisterClassEx should check for invalid cbSize field.

Dylan Smith dylan.ah.smith at gmail.com
Sat Jul 17 23:37:29 CDT 2010


On Sat, Jul 17, 2010 at 11:32 PM, Dmitry Timoshkov
<dmitry at codeweavers.com>wrote:

>
> Testing other values besides 0 would be helpful, in particular values like
> sizeof(class) - 1 and sizeof(class) + 1. Did you inspect all the places
> in Wine which call RegisterClassEx()? Also, GetClassInfoEx() in Wine is an
> obvious offender, and this needs a test (and a fix) too.
>
> I checked all calls to RegisterClassEx and submitted patches that got
accepted before the end of the code freeze.

I just checked sizeof(class) - 1 and sizeof(class) + 1 on Windows XP and
they also fail.
Surprisingly I found that GetClassInfoEx didn't touch cbSize (e.g. 0 stays
0, 0xdeadbeef stays 0xdeadbeef).
I also checked the unicode version of GetClassInfoEx and RegisterClassEx,
and both have the same behaviour.

Thanks for the advice. I'll add the tests for GetClassInfoEx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100718/669f6f25/attachment.htm>


More information about the wine-devel mailing list