diff --git a/client/Windows/cli/wfreerdp.c b/client/Windows/cli/wfreerdp.c index e8ff4860c..a9b3c1730 100644 --- a/client/Windows/cli/wfreerdp.c +++ b/client/Windows/cli/wfreerdp.c @@ -79,7 +79,7 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine if (!context->argv[index]) { ret = 1; - for (--index; index > = 0; --index) + for (--index; index >= 0; --index) free(context->argv[index]); free(context->argv); context->argv = NULL; diff --git a/client/common/file.c b/client/common/file.c index bbbe3b47b..093345103 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -318,7 +318,7 @@ static int freerdp_client_rdp_file_set_string(rdpFile* file, const char* name, c else standard = 1; - if (tmp && !(*tmp = strdup(value))) + if (tmp && !(*tmp = _strdup(value))) return -1; if (index >= 0) diff --git a/libfreerdp/core/test/TestSettings.c b/libfreerdp/core/test/TestSettings.c index 7c81f4e48..3bfe5aa5a 100644 --- a/libfreerdp/core/test/TestSettings.c +++ b/libfreerdp/core/test/TestSettings.c @@ -11,8 +11,8 @@ int TestSettings(int argc, char* argv[]) printf("Couldn't create settings\n"); return -1; } - settings->Username = strdup("abcdefg"); - settings->Password = strdup("xyz"); + settings->Username = _strdup("abcdefg"); + settings->Password = _strdup("xyz"); cloned = freerdp_settings_clone(settings); if (!cloned) { diff --git a/winpr/libwinpr/sspi/NTLM/ntlm.c b/winpr/libwinpr/sspi/NTLM/ntlm.c index ba829abac..0e0d014c7 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm.c @@ -120,7 +120,7 @@ int ntlm_SetContextTargetName(NTLM_CONTEXT* context, char* TargetName) if (!GetComputerNameExA(ComputerNameDnsHostname, computerName, &nSize)) return -1; - name = strdup(computerName); + name = _strdup(computerName); if (!name) return -1; diff --git a/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c index ed7d9072b..8a5f89066 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c @@ -178,7 +178,7 @@ int ntlm_get_target_computer_name(PUNICODE_STRING pName, COMPUTER_NAME_FORMAT ty if (!GetComputerNameExA(type, computerName, &nSize)) return -1; - name = strdup(computerName); + name = _strdup(computerName); if (!name) return -1; diff --git a/winpr/tools/makecert/makecert.c b/winpr/tools/makecert/makecert.c index b88f9a180..82fc42065 100644 --- a/winpr/tools/makecert/makecert.c +++ b/winpr/tools/makecert/makecert.c @@ -314,7 +314,7 @@ char* x509_get_default_name() if (!GetComputerNameExA(ComputerNameNetBIOS, computerName, &nSize)) return NULL; - ret = strdup(computerName); + ret = _strdup(computerName); if (!ret) return NULL;