Re: kernel32: Don't crash accessing an invalid handle in GlobalSize
18 Sep
2007
18 Sep
'07
8:13 a.m.
James Hawkins wrote:
+ if (IsBadReadPtr(pintern, 1)) + { + SetLastError(ERROR_INVALID_HANDLE); + return 0; + } + if(pintern->Magic==MAGIC_GLOBAL_USED) { if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */
It would be better to wrap the Magic access with an exception handler rather than use IsBadReadPtr. -- Rob Shearman
6659
Age (days ago)
6659
Last active (days ago)
0 comments
1 participants
participants (1)
-
Robert Shearman