Huw Davies : gdi32: Quote the printer name prior to passing it to the shell .

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 23 07:25:52 CDT 2007


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Aug 22 14:39:46 2007 +0100

gdi32: Quote the printer name prior to passing it to the shell.

---

 dlls/gdi32/printdrv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdi32/printdrv.c b/dlls/gdi32/printdrv.c
index 0cca2ad..9444536 100644
--- a/dlls/gdi32/printdrv.c
+++ b/dlls/gdi32/printdrv.c
@@ -468,7 +468,7 @@ static int CreateSpoolFile(LPCSTR pszOutput)
         RegCloseKey(hkey);
     }
     if (!psCmd[0] && !strncmp("LPR:",pszOutput,4))
-        sprintf(psCmd,"|lpr -P%s",pszOutput+4);
+        sprintf(psCmd,"|lpr -P'%s'",pszOutput+4);
 
     TRACE("Got printerSpoolCommand '%s' for output device '%s'\n",
 	  psCmd, pszOutput);




More information about the wine-cvs mailing list