Prevented strlen(NULL) in PRINTDLG_CreateDevNames().
Jorma Laaksonen (none)
jorma at pythian.
Sun Nov 25 04:57:37 CST 2007
---
dlls/comdlg32/printdlg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 39ac750..9b94340 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -187,7 +187,7 @@ static INT PRINTDLG_SetUpPrinterListComboW(HWND hDlg, UINT id, LPCWSTR name)
*
* (NB. when we handle unicode the offsets will be in wchars).
*/
-static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, const char* DeviceDriverName,
+static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, const char* DeviceDriverNameIn,
const char* DeviceName, const char* OutputPort)
{
long size;
@@ -196,6 +196,7 @@ static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, const char* DeviceDriverName,
LPDEVNAMES lpDevNames;
char buf[260];
DWORD dwBufLen = sizeof(buf);
+ const char* DeviceDriverName = DeviceDriverNameIn ? DeviceDriverNameIn : "";
size = strlen(DeviceDriverName) + 1
+ strlen(DeviceName) + 1
--
1.4.4.2
--=-=-=
--
Jorma Laaksonen jorma.laaksonen at tkk.fi
Teaching Research Scientist http://www.cis.hut.fi/jorma/
Dr. of Science in Technology, Docent tel. +358-9-4513269
Laboratory of Computer and Information Science fax. +358-9-4513277
Helsinki University of Technology mob. +358-50-3058719
Konemiehentie 2, P.O.Box 5400, FI-02015 TKK, FINLAND
--=-=-=--
More information about the wine-patches
mailing list