Dmitry Timoshkov : winspool.drv: Avoid converting garbage if there was no DEVMODE passed in.

Alexandre Julliard julliard at winehq.org
Fri Jun 14 11:03:50 CDT 2013


Module: wine
Branch: master
Commit: aa0cc00b48c458d02d3a069a92da8a358f97efdd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aa0cc00b48c458d02d3a069a92da8a358f97efdd

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Jun 14 12:18:49 2013 +0900

winspool.drv: Avoid converting garbage if there was no DEVMODE passed in.

---

 dlls/winspool.drv/info.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index fc74e76..2ab2401 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -2410,7 +2410,7 @@ LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
 	if(ret < 0) return ret;
 	pDevModeOutputA = HeapAlloc(GetProcessHeap(), 0, ret);
     }
-    pDevModeInputA = DEVMODEdupWtoA(pDevModeInput);
+    pDevModeInputA = (fMode & DM_IN_BUFFER) ? DEVMODEdupWtoA(pDevModeInput) : NULL;
     ret = DocumentPropertiesA(hWnd, hPrinter, pDeviceNameA, pDevModeOutputA,
 			      pDevModeInputA, fMode);
     if(pDevModeOutput) {




More information about the wine-cvs mailing list