unsigned char lpBuffer[4096];
LPCWSTR lpszAgent = L"RApps/1.0";
- URL_COMPONENTS urlComponents;
+ URL_COMPONENTSW urlComponents;
size_t urlLength, filenameLength;
const ATL::CSimpleArray<DownloadInfo> &InfoArray = static_cast<DownloadParam*>(param)->AppInfo;
urlLength = InfoArray[iAppId].szUrl.GetLength();
urlComponents.dwSchemeLength = urlLength + 1;
urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
- urlComponents.dwHostNameLength = urlLength + 1;
- urlComponents.lpszHostName = (LPWSTR) malloc(urlComponents.dwHostNameLength * sizeof(WCHAR));
if (!InternetCrackUrlW(InfoArray[iAppId].szUrl, urlLength + 1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
{
}
free(urlComponents.lpszScheme);
- free(urlComponents.lpszHostName);
#ifdef USE_CERT_PINNING
// are we using HTTPS to download the RAPPS update package? check if the certificate is original
szDownloadDir.ReleaseBuffer();
}
- szDownloadDir += L"\\RAPPS Downloads";
+ PathAppendW(szDownloadDir.GetBuffer(MAX_PATH), L"\\RAPPS Downloads");
+ szDownloadDir.ReleaseBuffer();
+
ATL::CStringW::CopyChars(pSettingsInfo->szDownloadDir,
_countof(pSettingsInfo->szDownloadDir),
szDownloadDir.GetString(),