[Bug 7380] FoxIT pdf reader 2.0 crashes

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Jan 17 12:43:53 CST 2008


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





--- Comment #32 from Anastasius Focht <focht at gmx.net>  2008-01-17 12:43:52 ---
Hello,

well I stumbled over this one just today while trying to use PowerISO windows
tool to convert some downloaded .daa file (damn proprietary formats).
I hate it when something doesn't work just when I need it ... so immediate
investigation was just natural to follow ;-)

--- quote ---
but the fix outlined by you in the end ( so in gdi32.StretchDIBits()) looks
better to me as well. 
--- quote ---

That was just my opinion. Although it might look more "hackish" to do an early
probe read, I think it's actually the right place to fix this crappy bug.

In general SEH guards should not be overused and placed very carefully in wine.
They should not cover too much code/nesting levels because that approach might
hide other bugs.
That's why I thought x11 driver's X11DRV_DIB_SetImageBits might not be the
right place for SEH.

Example for early probe read (it looks hackish but works, I tested with some
apps):

--- dlls/gdi32/dib.c ---
INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, ..
{
    if (!bits || !info)
        return 0; 

    /* detect broken MFC apps which pass invalid bits pointer */
    __TRY
    {
        volatile const char *ptr = bits;
        char dummy = ptr[0];
    }
    __EXCEPT_PAGE_FAULT
    {
        return 0;
    }
    __ENDTRY  
    ...
}
--- dlls/gdi32/dib.c ---

Anyway if that proposed x11 driver patch already pleased Alexandre, you might
resend it to mailing list, pointing again to this bug/comments.

Regards


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