[Bug 21613] Stack buffer read overflow in GdipCreateBitmapFromScan0

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Feb 6 10:39:05 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=21613





--- Comment #2 from Vincent Povirk <madewokherd at gmail.com>  2010-02-06 10:39:04 ---
I've been avoiding this for a while because I wanted to get the indexed color
stuff right. Gdiplus now stores its own color table for indexed color bitmaps,
but it doesn't sync the table with gdi32.

I don't think there's any reason to do this. I'm guessing gdi32 can't draw from
or to these bitmaps properly, since the palette has an alpha channel. The only
reason to keep making DIBs for them is so that we can get a (broken) device
context for the bitmaps and prevent any program that needs to draw to them from
crashing. In the long run, we should draw to them without using gdi32, and then
we can stop making DIBs.

My guess is that programs generally don't draw to indexed color bitmaps.
They're crippled on native gdiplus 1.0 and just not the sort of thing you use
gdiplus for. Even indexed color image files are really loaded as RGB color.

I'd be inclined to send a patch that sets a DIB color table of 1 color,
regardless of the actual depth.

-- 
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.



More information about the wine-bugs mailing list