http://bugs.winehq.com/show_bug.cgi?id=1844
Summary: Point Size in DLG_TEMPLATE may be negative (with DS_SETFONT) Product: Wine Version: unspecified Platform: PC URL: http://www.apis.de OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-user AssignedTo: wine-bugs@winehq.com ReportedBy: andy@rosen-berg.de
Within Windows the pointSize parameter (for the FONT in the DLG_TEMPLATE struct) may be a signed 16-bit integer. With WINE this integers get's converted to an unsigned int resulting in huge font for the dialog. The size of the dialog is being computed based on this font and results in invalid parameters for CreateWindow, that may cause a termination of WINE. We detected this problem testing our software with WINE.
If I understood things right the file dlls/user/dialog16.c contains the code causing the problem: Line 263 ....
if (result->style & DS_SETFONT) { result->pointSize = GET_WORD(p);"use a macro that gets signed 16bit int" p += sizeof(WORD); result->faceName = p; p += strlen(p) + 1; TRACE(" FONT %d,'%s'\n", result->pointSize, result->faceName ); }