localspl: do not crash, when Xcv was opened without a space in the
Name
Detlef Riekenberg
wine.dev at web.de
Mon Mar 5 22:40:50 CST 2007
localspl: do not crash, when Xcv was opened without a space in the Name
--
By by ... Detlef
-------------- next part --------------
>From 2e78b256fcf1db52a781f4c9a305b5af20a04415 Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Tue, 6 Mar 2007 05:34:13 +0100
Subject: [PATCH] localspl: do not crash, when Xcv was opened without a space in the Name
---
dlls/localspl/localmon.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c
index 3aa3485..c195c17 100644
--- a/dlls/localspl/localmon.c
+++ b/dlls/localspl/localmon.c
@@ -520,7 +520,13 @@ DWORD WINAPI localmon_XcvDataPort(HANDLE
if (!lstrcmpW(pszDataName, cmd_SetDefaultCommConfigW)) {
/* get the portname from the Handle */
ptr = strchrW(((xcv_t *)hXcv)->nameW, ' ');
- ptr++; /* skip the space */
+ if (ptr) {
+ ptr++; /* skip the space */
+ }
+ else
+ {
+ ptr = ((xcv_t *)hXcv)->nameW;
+ }
lstrcpynW(buffer, ptr, sizeof(buffer)/sizeof(WCHAR));
if (buffer[0]) buffer[lstrlenW(buffer)-1] = '\0'; /* remove the ':' */
res = SetDefaultCommConfigW(buffer, (LPCOMMCONFIG) pInputData, cbInputData);
--
1.4.1
More information about the wine-patches
mailing list