Hello,
Wine's implementation of GetKerningPairs in dlls/gdi/font.c behaves incorrectly (crashes) if lpkrnpair is NULL and nNumPairs is not zero.
Test program:
----------
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HDC hdc = GetDC(NULL); int kp = GetKerningPairs(hdc, 1, NULL); char msg[200]; sprintf(msg, "GetKerningPairs returns: %d\n", kp); MessageBox(NULL, msg, "success", MB_OK); return 0; }
----------
On Windows (tested on XP SP2) this program displays a message box and exits cleanly. On Wine it causes a page fault trying to write to address 0x00000004.
It's probably a trivial problem, but unfortunately I don't have time right now to investigate the issue and make a patch against current CVS.
Best regards,
On Wed, Jan 11, 2006 at 05:55:00PM +0100, Piotr Pawłow wrote:
Hello,
Wine's implementation of GetKerningPairs in dlls/gdi/font.c behaves incorrectly (crashes) if lpkrnpair is NULL and nNumPairs is not zero.
Thanks, patch sent and committed.
Huw.