Protect some DIB functions from bad inputs.

Mike McCormack mike at codeweavers.com
Wed Apr 12 06:17:40 CDT 2006


Vitaly Lipatov wrote:
> В сообщении от 12 апреля 2006 14:18 Alexandre Julliard написал(a):
> 
>>IsBadReadPtr is broken and should never be used. You need to add an
>>exception handler around the actual access.
> 
> I know many MS's dlls use IsBadReadPtr for check pointers.
> IsBadReadPtr is malfunction conceptually or it is not realized correctly yet?

Something about it here:

http://blogs.msdn.com/oldnewthing/archive/2006/01/17/513779.aspx

It also has a race condition.  A thread could unmap the memory your 
checked after you checked it and before you try to read it.

Mike




More information about the wine-devel mailing list