Author: cwittich
Date: Wed Nov 14 18:02:41 2007
New Revision: 30446
URL:
http://svn.reactos.org/svn/reactos?rev=30446&view=rev
Log:
don't try to copy lpToken when it is NULL
Modified:
trunk/reactos/base/applications/mstsc/connectdialog.c
trunk/reactos/base/applications/mstsc/settings.c
Modified: trunk/reactos/base/applications/mstsc/connectdialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/co…
==============================================================================
--- trunk/reactos/base/applications/mstsc/connectdialog.c (original)
+++ trunk/reactos/base/applications/mstsc/connectdialog.c Wed Nov 14 18:02:41 2007
@@ -36,7 +36,7 @@
static WCHAR szFilter[] = L"Remote Desktop Files (*rdp)\0*.rdp\0";
ZeroMemory(&ofn, sizeof(ofn));
- ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.lStructSize = sizeof(OPENFILENAMEW);
ofn.hwndOwner = pInfo->hGeneralPage;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
@@ -62,7 +62,7 @@
static WCHAR szFilter[] = L"Remote Desktop Files (*rdp)\0*.rdp\0";
ZeroMemory(&ofn, sizeof(ofn));
- ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.lStructSize = sizeof(OPENFILENAMEW);
ofn.hwndOwner = pInfo->hGeneralPage;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
@@ -1118,7 +1118,7 @@
txtRc.right = bmpRc.right * 0.75;
txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.5;
- ZeroMemory(&lf, sizeof(LOGFONT));
+ ZeroMemory(&lf, sizeof(LOGFONTW));
if (LoadStringW(hInst,
IDS_HEADERTEXT1,
Modified: trunk/reactos/base/applications/mstsc/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/se…
==============================================================================
--- trunk/reactos/base/applications/mstsc/settings.c (original)
+++ trunk/reactos/base/applications/mstsc/settings.c Wed Nov 14 18:02:41 2007
@@ -252,13 +252,15 @@
{
pRdpSettings->pSettings[i].Type = lpToken[0];
lpToken = wcstok(NULL, szSeps);
- pRdpSettings->pSettings[i].Value.i = _wtoi(lpToken);
+ if (lpToken != NULL)
+ pRdpSettings->pSettings[i].Value.i = _wtoi(lpToken);
}
else if (lpToken[0] == L's')
{
pRdpSettings->pSettings[i].Type = lpToken[0];
lpToken = wcstok(NULL, szSeps);
- wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken);
+ if (lpToken != NULL)
+ wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken);
}
bFound = TRUE;
}