Commit faae2144 authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

winspool.drv: Ignore input in DocumentPropertiesA unless DM_IN_BUFFER is passed.

The GdiConvertToDevmodeW call can crash if the incoming DEVMODEA has nonsense values.
parent 796f2822
......@@ -1898,7 +1898,7 @@ LONG WINAPI DocumentPropertiesA(HWND hwnd, HANDLE printer, char *device_name, DE
outputW = malloc(ret);
}
if (input) inputW = GdiConvertToDevmodeW(input);
if (input && (mode & DM_IN_BUFFER)) inputW = GdiConvertToDevmodeW(input);
ret = DocumentPropertiesW(hwnd, printer, device, outputW, inputW, mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment