Added sanity check to WINPROC_CallWndProc

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sun Jul 15 13:38:20 CDT 2001


>>>>> "Jukka" == Jukka Heinonen <jhei at iki.fi> writes:

    Jukka> DeusEx causes Wine to crash (segmentation fault) because it calls
    Jukka> CallWindowProc and passes null in HWND parameter.  While I
    Jukka> suspect that this is because some Wine function that should
    Jukka> return a valid HWND is returning a null pointer, the crashing can
    Jukka> be fixed simply by adding a sanity check to WINPROC_CallWndProc.

How does Windows behave on those invalid arguments?

    Jukka> After this patch, both DeusEx installer and DeusEx dialog for
    Jukka> choosing rendering engine work. However, DeusEx still crashes
    Jukka> later because DeusEx for some reason generates a division by zero
    Jukka> FP exception. DeusEx handler for this exception calls
    Jukka> __CxxFrameHandler which is not implemented by Wine and thus
    Jukka> exception handling ends into infinite recursion. Luckily stack
    Jukka> overflow makes Wine to crash :)

Native msvcrt has __CxxFrameHandler, but I aggree that wine-msvcrt needs
exception facilities too.

Bye

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------




More information about the wine-patches mailing list