[Bug 20553] Invalid read in LISTVIEW_NCDestroy in chromium unit_tests.exe in TableViewTest.Sort?

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 14 14:10:09 CST 2009


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





--- Comment #9 from Alexandre Julliard <julliard at winehq.org>  2009-11-14 14:10:09 ---
(In reply to comment #8)
> Here was another problem discussed in this thread (corrupting heap overwriting
> area marked free), and it doesn't exist any more. Currently I see a possible
> fix for that using following condition:
> 
> ---
> HeapSize(GetProcessHeap(), 0, himl) >= sizeof(void*)
> ---
> 
> to determine if required field available to read. This will prevent from
> reading out of allocated area. Failure will be indicated by -1 return value.
> This check should be next after checking himl for null.
> 
> P.S. I'm using sizeof(void*) here instead of sizeof(DWORD) cause of bug 20696
> where I think it's possible to use vtable pointer as a magic (HIMAGELIST isn't
> reusable for another process anyway).

HeapSize is not a reliable way to test for a valid handle. If you want to check
vtable or magic you can do that just as well without a HeapSize first.

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