Commit 2253edb7 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

localspl: Do not crash when Xcv was opened without a space in the name.

parent 753e61fe
......@@ -520,7 +520,13 @@ DWORD WINAPI localmon_XcvDataPort(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInput
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);
......
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