Fixed freerdp_load_dynamic_addin path

This commit is contained in:
Armin Novak 2018-08-23 13:06:15 +02:00
parent 8d473af4fb
commit 59819818f3
1 changed files with 4 additions and 3 deletions

View File

@ -188,7 +188,7 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_addin(LPCSTR pszFileName,
if (!pszRelativeFilePath)
goto fail;
sprintf_s(pszRelativeFilePath, relPathLen, "%s", pszRelativeFilePath);
sprintf_s(pszRelativeFilePath, relPathLen, "%s", pszPath);
NativePathCchAppendA(pszRelativeFilePath, relPathLen, pszAddinFile);
}
else
@ -245,7 +245,7 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName,
if (pszName && pszSubsystem && pszType)
{
const size_t cchFileName = cchBaseFileName + strlen(pszName) + strlen(pszSubsystem) + strlen(
pszType) + strlen(pszExtension);
pszType) + strlen(pszExtension);
pszFileName = (LPSTR) malloc(cchFileName);
if (!pszFileName)
@ -256,7 +256,8 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName,
}
else if (pszName && pszSubsystem)
{
const size_t cchFileName = cchBaseFileName + strlen(pszName) + strlen(pszSubsystem) + strlen(pszExtension);
const size_t cchFileName = cchBaseFileName + strlen(pszName) + strlen(pszSubsystem) + strlen(
pszExtension);
pszFileName = (LPSTR) malloc(cchFileName);
if (!pszFileName)