Fix crash in CreateDCA

Maxime Bellengé maxime.bellenge at wanadoo.fr
Sat Apr 23 08:28:36 CDT 2005


I have an application which calls CreateDCA with lpszDriver set to
"DISPLAY" and lpInitData parameter not set to NULL. So CreateDCA calls
GdiConvertToDevmodeW which crashes in memcpy because the lpInitData only
contains garbage.
MSDN states that if lpszDriver is DISPLAY, lpInitData must be NULL.
This patch adds a check to prevent this crash.

Max

ChangeLog:
    * Prevent CreateDCA from crashing if a bad lpInitData parameter is
provided
-------------- next part --------------
A non-text attachment was scrubbed...
Name: createdca.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050423/61d84207/createdca.bin


More information about the wine-patches mailing list