Re: [1/2] winex11.drv: Add PS_USERSTYLE support to pens (take 2)
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
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
participants (1)
-
Daniel