[1/2] winex11.drv: Add PS_USERSTYLE support to pens (take 2)

Daniel danielfsantos at att.net
Tue Feb 15 02:12:48 CST 2011


OK, actually it looks like the problem is already in X11DRV_SelectPen
and is unlikely to occur, so my patches are good.

Still, I'm thinking that if GetObjectW fails
(http://source.winehq.org/source/dlls/winex11.drv/pen.c#L45) then we
should immediately exit the function returning zero rather than mucking
around any further, setting the pen's ext field to zero, etc.  Then
PEN_SelectObject (http://source.winehq.org/source/dlls/gdi32/pen.c#L220)
wont replace the current pen with the uninitialized data.  I realize
this perhaps "shouldn't fail" after a successful call to
GDI_inc_ref_count, but it still seems more responsible.

Daniel

On 02/15/2011 01:37 AM, Daniel wrote:
> grr, please disregard previous patches.  I've discovered a problem
> that can lead to use of un-initialized values.
>
> Daniel
>
> On 02/15/2011 01:09 AM, Daniel wrote:
>> Clean up per Vitaliy's direction. Also found a FIXME comment that needed
>> to be removed.
>>
>> Daniel
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110215/09b5cb8d/attachment-0001.htm>


More information about the wine-devel mailing list