RE: [GD-Windows] Nasty GUI bug
Brought to you by:
vexxed72
From: Tom F. <to...@mu...> - 2002-10-11 15:01:44
|
Erm... IIRC, the GetDeviceCaps call of many drivers scribbles past the area you give it. So allocate a much bigger buffer (I used 4k extra and didn't have any further problems). Maybe this is a similar or related problem? Tom Forsyth - Muckyfoot bloke and Microsoft MVP. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Pierre Terdiman [mailto:p.t...@wa...] > Sent: 11 October 2002 15:51 > To: gam...@li... > Subject: Re: [GD-Windows] Nasty GUI bug > > > > Going to check my bounds right now. > > No luck so far, but BS found something in another part of my > code. This is > in a DX7 renderer, the code is : > > // Get the current display depth > DEVMODE devmode; > devmode.dmSize = sizeof(DEVMODE); > EnumDisplaySettings(null, ENUM_CURRENT_SETTINGS, &devmode); > > And BS tells me : > > Stack memory overrun > Copying 156 bytes to devmode > Starting offset: 0, destination size: 148 bytes > > Indeed, sizeof(DEVMODE) is 148. > > Is it a known bug ? Looks nasty. > > > Also, is there a way to get the internal reference count of a DLL ? > > ...to be continued... > > Pierre > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |