summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-23 16:25:49 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-23 16:25:49 +0000
commitf2de79cb2eb8247548650ee80d75be109ac66ee7 (patch)
tree5f6ae43436ad92857bc3361556e581dea0a28270 /protocols
parent83810fbdf96dc0a842bf149cfa40749e95b0fe63 (diff)
replace strcat to mir_strcat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13777 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp32
-rw-r--r--protocols/ICQCorp/src/services.cpp2
-rw-r--r--protocols/IRCG/src/irclib.cpp2
-rw-r--r--protocols/IcqOscarJ/src/capabilities.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_01service.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_04message.cpp10
-rw-r--r--protocols/IcqOscarJ/src/icq_clients.cpp86
-rw-r--r--protocols/IcqOscarJ/src/icq_filetransfer.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_popups.cpp16
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp14
-rw-r--r--protocols/IcqOscarJ/src/icq_xtraz.cpp6
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp8
-rw-r--r--protocols/IcqOscarJ/src/stdpackets.cpp4
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp2
-rw-r--r--protocols/MSN/src/msn_auth.cpp4
-rw-r--r--protocols/MSN/src/msn_misc.cpp2
-rw-r--r--protocols/MSN/src/msn_p2p.cpp8
-rw-r--r--protocols/Sametime/src/files.cpp6
-rw-r--r--protocols/SkypeClassic/src/filexfer.cpp8
-rw-r--r--protocols/SkypeClassic/src/skypeapi.cpp14
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp2
-rw-r--r--protocols/Tlen/src/tlen_file.cpp4
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp10
-rw-r--r--protocols/Xfire/src/SHA1.cpp8
-rw-r--r--protocols/Xfire/src/SHA1.h2
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp2
-rw-r--r--protocols/Xfire/src/clientloginpacket.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp40
-rw-r--r--protocols/Xfire/src/options.cpp4
-rw-r--r--protocols/Xfire/src/processbuddyinfo.cpp10
-rw-r--r--protocols/Xfire/src/searching4games.cpp44
-rw-r--r--protocols/Xfire/src/tools.cpp8
-rw-r--r--protocols/Xfire/src/variables.cpp18
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_util.cpp2
35 files changed, 198 insertions, 198 deletions
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 378d20f78e..f949bd7479 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -113,18 +113,18 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> &params, const char *httpmet
res = (char *)mir_alloc(size);
mir_strcpy(res, httpmethod);
- strcat(res, "&");
- strcat(res, urlenc);
+ mir_strcat(res, "&");
+ mir_strcat(res, urlenc);
mir_free(urlenc);
- strcat(res, "&");
+ mir_strcat(res, "&");
for (i = 0; i < params.getCount(); i++) {
p = params[i];
if (!mir_strcmp(p->name, "oauth_signature")) continue;
- if (i > 0) strcat(res, "%26");
- strcat(res, p->name);
- strcat(res, "%3D");
- strcat(res, p->value);
+ if (i > 0) mir_strcat(res, "%26");
+ mir_strcat(res, p->name);
+ mir_strcat(res, "%3D");
+ mir_strcat(res, p->value);
}
return res;
@@ -196,8 +196,8 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> &params, const char *httpmethod, con
ptrA tsenc( oauth_uri_escape(token_secret));
ptrA key((char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2));
mir_strcpy(key, csenc);
- strcat(key, "&");
- strcat(key, tsenc);
+ mir_strcat(key, "&");
+ mir_strcat(key, tsenc);
BYTE digest[MIR_SHA1_HASH_SIZE];
mir_hmac_sha1(digest, (BYTE*)(char*)key, mir_strlen(key), (BYTE*)(char*)text, mir_strlen(text));
@@ -209,8 +209,8 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> &params, const char *httpmethod, con
sign = (char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2);
mir_strcpy(sign, csenc);
- strcat(sign, "&");
- strcat(sign, tsenc);
+ mir_strcat(sign, "&");
+ mir_strcat(sign, tsenc);
}
oauth_setparam(params, "oauth_signature", sign);
@@ -277,11 +277,11 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD
for (i = 0; i < oauth_parameters.getCount(); i++) {
OAUTHPARAMETER *p = oauth_parameters[i];
- if (i > 0) strcat(res, ",");
- strcat(res, p->name);
- strcat(res, "=\"");
- strcat(res, p->value);
- strcat(res, "\"");
+ if (i > 0) mir_strcat(res, ",");
+ mir_strcat(res, p->name);
+ mir_strcat(res, "=\"");
+ mir_strcat(res, p->value);
+ mir_strcat(res, "\"");
}
oauth_freeparams(oauth_parameters);
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index e97dca0e4f..d4c8379d75 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -527,7 +527,7 @@ static int icqModulesLoaded(WPARAM wParam, LPARAM lParam)
char *CreateServiceName(char *serviceName, char *functionName)
{
mir_strcpy(serviceName, protoName);
- strcat(serviceName, functionName);
+ mir_strcat(serviceName, functionName);
return serviceName;
}
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp
index d330cc0963..9b333a5597 100644
--- a/protocols/IRCG/src/irclib.cpp
+++ b/protocols/IRCG/src/irclib.cpp
@@ -178,7 +178,7 @@ void CIrcProto::SendIrcMessage(const TCHAR* msg, bool bNotify, int codepage)
rtrim(str);
int cbLen = (int)mir_strlen(str);
str = (char*)mir_realloc(str, cbLen + 3);
- strcat(str, "\r\n");
+ mir_strcat(str, "\r\n");
NLSend((const BYTE*)str, cbLen + 2);
mir_free(str);
diff --git a/protocols/IcqOscarJ/src/capabilities.cpp b/protocols/IcqOscarJ/src/capabilities.cpp
index 06abb24da0..b6af33a09c 100644
--- a/protocols/IcqOscarJ/src/capabilities.cpp
+++ b/protocols/IcqOscarJ/src/capabilities.cpp
@@ -88,8 +88,8 @@ void NetLog_CapabilityChange(CIcqProto *ppro, const char *szChange, DWORD fdwCap
// Check if the current capability is present
if ((fdwCapabilities & CapabilityNames[nIndex].capID) == CapabilityNames[nIndex].capID) {
if (mir_strlen(szBuffer))
- strcat(szBuffer, ", ");
- strcat(szBuffer, CapabilityNames[nIndex].capName);
+ mir_strcat(szBuffer, ", ");
+ mir_strcat(szBuffer, CapabilityNames[nIndex].capName);
}
}
// Log the change
diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp
index 948cf1d92d..2f31a8a890 100644
--- a/protocols/IcqOscarJ/src/fam_01service.cpp
+++ b/protocols/IcqOscarJ/src/fam_01service.cpp
@@ -526,8 +526,8 @@ char* CIcqProto::buildUinList(int subtype, size_t wMaxLen, MCONTACT *hContactRes
return szList;
}
- strcat(szList, szLen);
- strcat(szList, szUID);
+ mir_strcat(szList, szLen);
+ mir_strcat(szList, szUID);
}
}
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp
index 3dc6b83c19..5ceaf78eae 100644
--- a/protocols/IcqOscarJ/src/fam_04message.cpp
+++ b/protocols/IcqOscarJ/src/fam_04message.cpp
@@ -309,7 +309,7 @@ void CIcqProto::handleRecvServMsgType1(BYTE *buf, size_t wLen, DWORD dwUin, char
// Append the new message part
szMsg = (char*)SAFE_REALLOC(szMsg, mir_strlen(szMsg) + mir_strlen(szMsgPart) + 1);
- strcat(szMsg, szMsgPart);
+ mir_strcat(szMsg, szMsgPart);
SAFE_FREE(&szMsgPart);
}
wMsgPart++;
@@ -1605,10 +1605,10 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
char *szDataUrl = ansi_to_utf8(pszMsgField[1]);
char *szBlob = (char *)SAFE_MALLOC(mir_strlen(szTitle) + mir_strlen(szDataDescr) + mir_strlen(szDataUrl) + 8);
mir_strcpy(szBlob, szTitle);
- strcat(szBlob, " ");
- strcat(szBlob, szDataDescr); // Description
- strcat(szBlob, "\r\n");
- strcat(szBlob, szDataUrl); // URL
+ mir_strcat(szBlob, " ");
+ mir_strcat(szBlob, szDataDescr); // Description
+ mir_strcat(szBlob, "\r\n");
+ mir_strcat(szBlob, szDataUrl); // URL
SAFE_FREE(&szTitle);
SAFE_FREE(&szDataDescr);
SAFE_FREE(&szDataUrl);
diff --git a/protocols/IcqOscarJ/src/icq_clients.cpp b/protocols/IcqOscarJ/src/icq_clients.cpp
index 3ccce04839..79f6e6d9e9 100644
--- a/protocols/IcqOscarJ/src/icq_clients.cpp
+++ b/protocols/IcqOscarJ/src/icq_clients.cpp
@@ -47,9 +47,9 @@ static void verToStr(char *szStr, int v)
{
char szVer[64];
makeClientVersion(szVer, "", (v >> 24) & 0x7F, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF);
- strcat(szStr, szVer);
+ mir_strcat(szStr, szVer);
if (v & 0x80000000)
- strcat(szStr, " alpha");
+ mir_strcat(szStr, " alpha");
}
static char* MirandaVersionToStringEx(char* szStr, int bUnicode, const char* szPlug, int v, int m)
@@ -66,16 +66,16 @@ static char* MirandaVersionToStringEx(char* szStr, int bUnicode, const char* szP
else {
if (m) {
verToStr(szStr, m);
- strcat(szStr, " ");
+ mir_strcat(szStr, " ");
}
if (bUnicode)
- strcat(szStr, "Unicode ");
+ mir_strcat(szStr, "Unicode ");
- strcat(szStr, "(");
- strcat(szStr, szPlug);
- strcat(szStr, " v");
+ mir_strcat(szStr, "(");
+ mir_strcat(szStr, szPlug);
+ mir_strcat(szStr, " v");
verToStr(szStr, v);
- strcat(szStr, ")");
+ mir_strcat(szStr, ")");
}
return szStr;
@@ -90,7 +90,7 @@ char* MirandaModToString(char* szStr, capstr* capId, int bUnicode, const char* s
char *szClient = MirandaVersionToStringEx(szStr, bUnicode, szModName, iver, mver);
if (scode == 0x5AFEC0DE)
- strcat(szClient, " + SecureIM");
+ mir_strcat(szClient, " + SecureIM");
return szClient;
}
@@ -227,7 +227,7 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, cliLicqVer, ver / 1000, (ver / 10) % 100, ver % 10, 0);
if (dwFT1 & 0x00800000)
- strcat(szClientBuf, "/SSL");
+ mir_strcat(szClientBuf, "/SSL");
}
else if (dwFT1 == 0xffffff8f)
szClient = "StrICQ";
@@ -273,16 +273,16 @@ const char* CIcqProto::detectUserClient(
// http://darkjimm.ucoz.ru/
if (dwFT2 == 0x10000) {
mir_strcpy(szClientBuf, "D[i]Chat v.");
- strcat(szClientBuf, "0.1a");
+ mir_strcat(szClientBuf, "0.1a");
}
else {
makeClientVersion(szClientBuf, "D[i]Chat v.", (dwFT2 >> 8) & 0x0F, (dwFT2 >> 4) & 0x0F, 0, 0);
if ((dwFT2 & 0x0F) == 1)
- strcat(szClientBuf, " alpha");
+ mir_strcat(szClientBuf, " alpha");
else if ((dwFT2 & 0x0F) == 2)
- strcat(szClientBuf, " beta");
+ mir_strcat(szClientBuf, " beta");
else if ((dwFT2 & 0x0F) == 3)
- strcat(szClientBuf, " final");
+ mir_strcat(szClientBuf, " final");
}
szClient = szClientBuf;
}
@@ -310,16 +310,16 @@ const char* CIcqProto::detectUserClient(
if (MatchCapability(caps, wLen, &capIcqJs7, 0x4)) {
// detect mod
- strcat(szClientBuf, " (s7 & sss)");
+ mir_strcat(szClientBuf, " (s7 & sss)");
if (MatchCapability(caps, wLen, &capIcqJs7, 0xE))
- strcat(szClientBuf, " + SecureIM");
+ mir_strcat(szClientBuf, " + SecureIM");
}
else if ((dwFT1 & 0x7FFFFFFF) == 0x7FFFFFFF) {
if (MatchCapability(caps, wLen, &capMimMobile))
- strcat(szClientBuf, " (Mobile)");
+ mir_strcat(szClientBuf, " (Mobile)");
if (dwFT3 == 0x5AFEC0DE)
- strcat(szClientBuf, " + SecureIM");
+ mir_strcat(szClientBuf, " + SecureIM");
}
*bClientId = CLID_MIRANDA;
bMirandaIM = TRUE;
@@ -332,7 +332,7 @@ const char* CIcqProto::detectUserClient(
szClient = szClientBuf;
if ((dwFT1 & 0x7FFFFFFF) == 0x7FFFFFFF && dwFT3 == 0x5AFEC0DE)
- strcat(szClientBuf, " + SecureIM");
+ mir_strcat(szClientBuf, " + SecureIM");
*bClientId = CLID_MIRANDA;
bMirandaIM = TRUE;
@@ -395,9 +395,9 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, "SIM ", ver1, ver2, ver3, ver4 & 0x0F);
if (ver4 & 0x80)
- strcat(szClientBuf, "/Win32");
+ mir_strcat(szClientBuf, "/Win32");
else if (ver4 & 0x40)
- strcat(szClientBuf, "/MacOS X");
+ mir_strcat(szClientBuf, "/MacOS X");
}
else if (capId = MatchCapability(caps, wLen, &capLicq, 0xC)) {
unsigned ver1 = (*capId)[0xC];
@@ -406,7 +406,7 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, cliLicqVer, ver1, ver2, ver3, 0);
if ((*capId)[0xF])
- strcat(szClientBuf, "/SSL");
+ mir_strcat(szClientBuf, "/SSL");
}
else if (capId = MatchCapability(caps, wLen, &capKopete, 0xC)) {
unsigned ver1 = (*capId)[0xC];
@@ -424,11 +424,11 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, "climm ", ver1, ver2, ver3, ver4);
if ((ver1 & 0x80) == 0x80)
- strcat(szClientBuf, " alpha");
+ mir_strcat(szClientBuf, " alpha");
if (dwFT3 == 0x02000020)
- strcat(szClientBuf, "/Win32");
+ mir_strcat(szClientBuf, "/Win32");
else if (dwFT3 == 0x03000800)
- strcat(szClientBuf, "/MacOS X");
+ mir_strcat(szClientBuf, "/MacOS X");
}
else if (capId = MatchCapability(caps, wLen, &capmIcq, 0xC)) {
unsigned ver1 = (*capId)[0xC];
@@ -438,7 +438,7 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, "mICQ ", ver1, ver2, ver3, ver4);
if ((ver1 & 0x80) == 0x80)
- strcat(szClientBuf, " alpha");
+ mir_strcat(szClientBuf, " alpha");
}
// IM2 v2 provides also Aim Icon cap
else if (MatchCapability(caps, wLen, &capIm2))
@@ -474,10 +474,10 @@ const char* CIcqProto::detectUserClient(
mir_strcpy(szClientBuf, "QIP Infium");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
- strcat(szClientBuf, ver);
+ mir_strcat(szClientBuf, ver);
}
if (dwFT2 == 0x0B)
- strcat(szClientBuf, " Beta");
+ mir_strcat(szClientBuf, " Beta");
szClient = szClientBuf;
}
@@ -485,7 +485,7 @@ const char* CIcqProto::detectUserClient(
mir_strcpy(szClientBuf, "QIP 2010");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
- strcat(szClientBuf, ver);
+ mir_strcat(szClientBuf, ver);
}
szClient = szClientBuf;
@@ -494,7 +494,7 @@ const char* CIcqProto::detectUserClient(
mir_strcpy(szClientBuf, "QIP 2012");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
- strcat(szClientBuf, ver);
+ mir_strcat(szClientBuf, ver);
}
szClient = szClientBuf;
@@ -508,7 +508,7 @@ const char* CIcqProto::detectUserClient(
mir_snprintf(szClientBuf, 64, cliQip, ver);
if (dwFT1 && dwFT2 == 0x0E) {
mir_snprintf(ver, SIZEOF(ver), " (%d%d%d%d)", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF, (dwFT1 >> 0x08) & 0xFF, dwFT1 & 0xFF);
- strcat(szClientBuf, ver);
+ mir_strcat(szClientBuf, ver);
}
szClient = szClientBuf;
}
@@ -530,8 +530,8 @@ const char* CIcqProto::detectUserClient(
mir_snprintf(ver, SIZEOF(ver), " %d.%d", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF);
if ((dwFT1 & 0xFF) == 0x0B)
- strcat(ver, " Beta");
- strcat(szClientBuf, ver);
+ mir_strcat(ver, " Beta");
+ mir_strcat(szClientBuf, ver);
}
szClient = szClientBuf;
}
@@ -625,13 +625,13 @@ const char* CIcqProto::detectUserClient(
switch ((*capId)[0x5]) {
case 'l':
- strcat(szClientBuf, "/Linux");
+ mir_strcat(szClientBuf, "/Linux");
break;
case 'w':
- strcat(szClientBuf, "/Win32");
+ mir_strcat(szClientBuf, "/Win32");
break;
case 'm':
- strcat(szClientBuf, "/MacOS X");
+ mir_strcat(szClientBuf, "/MacOS X");
break;
}
}
@@ -747,11 +747,11 @@ const char* CIcqProto::detectUserClient(
else mir_strcpy(szClientBuf, "icq5");
if (MatchCapability(caps, wLen, &capRambler))
- strcat(szClientBuf, " (Rambler)");
+ mir_strcat(szClientBuf, " (Rambler)");
else if (MatchCapability(caps, wLen, &capAbv))
- strcat(szClientBuf, " (Abv)");
+ mir_strcat(szClientBuf, " (Abv)");
else if (MatchCapability(caps, wLen, &capNetvigator))
- strcat(szClientBuf, " (Netvigator)");
+ mir_strcat(szClientBuf, " (Netvigator)");
szClient = szClientBuf;
}
@@ -885,9 +885,9 @@ const char* CIcqProto::detectUserClient(
szClient = makeClientVersion(szClientBuf, "SIM ", ver1, ver2, ver3, 0);
if ((*capId)[0xF] & 0x80)
- strcat(szClientBuf, "/Win32");
+ mir_strcat(szClientBuf, "/Win32");
else if ((*capId)[0xF] & 0x40)
- strcat(szClientBuf, "/MacOS X");
+ mir_strcat(szClientBuf, "/MacOS X");
}
else if (capId = MatchCapability(caps, wLen, &capKopete, 0xC)) {
unsigned ver1 = (*capId)[0xC];
@@ -951,7 +951,7 @@ const char* CIcqProto::detectUserClient(
szClient = szClientBuf;
}
- strcat(szClientBuf, szPack);
+ mir_strcat(szClientBuf, szPack);
}
}
@@ -993,7 +993,7 @@ const char* CIcqProto::detectUserClient(
mir_strcpy(szClientBuf, szClient);
szClient = szClientBuf;
}
- strcat(szClientBuf, szExtra);
+ mir_strcat(szClientBuf, szExtra);
}
}
diff --git a/protocols/IcqOscarJ/src/icq_filetransfer.cpp b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
index 25a4e2f820..b03872e91b 100644
--- a/protocols/IcqOscarJ/src/icq_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
@@ -263,7 +263,7 @@ void NormalizeBackslash(char* path)
{
size_t len = mir_strlen(path);
if (len && path[len-1] != '\\')
- strcat(path, "\\");
+ mir_strcat(path, "\\");
}
/* a file transfer looks like this:
@@ -377,10 +377,10 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, size_t wL
char *szFullPath = (char*)SAFE_MALLOC(mir_strlen(dc->ft->szSavePath) + mir_strlen(dc->ft->szThisSubdir) + mir_strlen(dc->ft->szThisFile) + 3);
mir_strcpy(szFullPath, dc->ft->szSavePath);
NormalizeBackslash(szFullPath);
- strcat(szFullPath, dc->ft->szThisSubdir);
+ mir_strcat(szFullPath, dc->ft->szThisSubdir);
NormalizeBackslash(szFullPath);
// _chdir(szFullPath); // set current dir - not very useful
- strcat(szFullPath, dc->ft->szThisFile);
+ mir_strcat(szFullPath, dc->ft->szThisFile);
// we joined the full path to dest file
SAFE_FREE(&dc->ft->szThisFile);
dc->ft->szThisFile = szFullPath;
diff --git a/protocols/IcqOscarJ/src/icq_popups.cpp b/protocols/IcqOscarJ/src/icq_popups.cpp
index bebaa2a01f..ae86931ce7 100644
--- a/protocols/IcqOscarJ/src/icq_popups.cpp
+++ b/protocols/IcqOscarJ/src/icq_popups.cpp
@@ -214,35 +214,35 @@ int CIcqProto::ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *
rsIcon = MAKEINTRESOURCE(IDI_INFORMATION);
ppd.colorBack = DEFAULT_LOG0_BACK_COLORS;
ppd.colorText = DEFAULT_LOG0_TEXT_COLORS;
- strcat(szPrefix, "0");
+ mir_strcat(szPrefix, "0");
break;
case LOG_WARNING:
rsIcon = MAKEINTRESOURCE(IDI_WARNING);
ppd.colorBack = DEFAULT_LOG1_BACK_COLORS;
ppd.colorText = DEFAULT_LOG1_TEXT_COLORS;
- strcat(szPrefix, "1");
+ mir_strcat(szPrefix, "1");
break;
case LOG_ERROR:
rsIcon = MAKEINTRESOURCE(IDI_ERROR);
ppd.colorBack = DEFAULT_LOG2_BACK_COLORS;
ppd.colorText = DEFAULT_LOG2_TEXT_COLORS;
- strcat(szPrefix, "2");
+ mir_strcat(szPrefix, "2");
break;
case LOG_FATAL:
rsIcon = MAKEINTRESOURCE(IDI_ERROR);
ppd.colorBack = DEFAULT_LOG3_BACK_COLORS;
ppd.colorText = DEFAULT_LOG3_TEXT_COLORS;
- strcat(szPrefix, "3");
+ mir_strcat(szPrefix, "3");
break;
case POPTYPE_SPAM:
rsIcon = MAKEINTRESOURCE(IDI_WARNING);
ppd.colorBack = DEFAULT_SPAM_BACK_COLORS;
ppd.colorText = DEFAULT_SPAM_TEXT_COLORS;
- strcat(szPrefix, "Spam");
+ mir_strcat(szPrefix, "Spam");
break;
default:
return -1;
@@ -263,15 +263,15 @@ int CIcqProto::ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *
}
else {
mir_strcpy(szSetting, szPrefix);
- strcat(szSetting, "TextColor");
+ mir_strcat(szSetting, "TextColor");
ppd.colorText = getDword(szSetting, ppd.colorText);
mir_strcpy(szSetting, szPrefix);
- strcat(szSetting, "BackColor");
+ mir_strcat(szSetting, "BackColor");
ppd.colorBack = getDword(szSetting, ppd.colorBack);
}
}
mir_strcpy(szSetting, szPrefix);
- strcat(szSetting, "Timeout");
+ mir_strcat(szSetting, "Timeout");
ppd.iSeconds = getDword(szSetting, ppd.iSeconds);
char str[4096];
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 5c5852e375..93ad99c91e 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -1317,7 +1317,7 @@ int __cdecl CIcqProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
mng = (char*)SAFE_REALLOC(mng, len + 28);
memmove(mng + 12, mng, len + 1);
memcpy(mng, "<HTML><BODY>", 12);
- strcat(mng, "</BODY></HTML>");
+ mir_strcat(mng, "</BODY></HTML>");
puszText = mng;
bNeedFreeU = 1;
}
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index cfa8c1dd7f..a361615d41 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -1484,8 +1484,8 @@ char *CIcqProto::getServListGroupCListPath(WORD wGroupId)
/// FIXME: properly handle ~N suffixes
szParentGroup = (char*)SAFE_REALLOC(szParentGroup, mir_strlen(szGroup) + mir_strlen(szParentGroup) + 2);
- strcat(szParentGroup, "\\");
- strcat(szParentGroup, (char*)szGroup + nGroupLevel);
+ mir_strcat(szParentGroup, "\\");
+ mir_strcat(szParentGroup, (char*)szGroup + nGroupLevel);
SAFE_FREE((void**)&szGroup);
szGroup = szParentGroup;
@@ -1552,8 +1552,8 @@ char* CIcqProto::getServListUniqueGroupName(const char *szGroupName, int bAlloce
szNewGroupName = (char*)SAFE_MALLOC(mir_strlen(szUnique) + mir_strlen(szGroupNameBase) + 2);
if (szNewGroupName) {
mir_strcpy(szNewGroupName, szGroupNameBase);
- strcat(szNewGroupName, "~");
- strcat(szNewGroupName, szUnique);
+ mir_strcat(szNewGroupName, "~");
+ mir_strcat(szNewGroupName, szUnique);
}
}
}
@@ -1587,8 +1587,8 @@ int CIcqProto::servlistCreateGroup_gotParentGroup(const char *szGroup, WORD wGro
szSubGroup = (char*)SAFE_MALLOC(mir_strlen(szGroup) + mir_strlen(szSubGroupName) + 2);
if (szSubGroup) {
mir_strcpy(szSubGroup, szGroup);
- strcat(szSubGroup, "\\");
- strcat(szSubGroup, szSubGroupName);
+ mir_strcat(szSubGroup, "\\");
+ mir_strcat(szSubGroup, szSubGroupName);
}
if (nResult == PENDING_RESULT_SUCCESS) // if we got an id count level
@@ -2148,7 +2148,7 @@ void CIcqProto::servlistRenameGroup(char *szGroup, WORD wGroupId, char *szNewGro
for (i = 0; i < nGroupLevel; i++) { // create level prefix
szNewGroupName[i] = '>';
}
- strcat(szNewGroupName, szGroupName);
+ mir_strcat(szNewGroupName, szGroupName);
}
else // simple groups do not require any conversion
szNewGroupName = null_strdup(szNewGroup);
diff --git a/protocols/IcqOscarJ/src/icq_xtraz.cpp b/protocols/IcqOscarJ/src/icq_xtraz.cpp
index f9dfd0615b..b09ca643d9 100644
--- a/protocols/IcqOscarJ/src/icq_xtraz.cpp
+++ b/protocols/IcqOscarJ/src/icq_xtraz.cpp
@@ -318,15 +318,15 @@ void CIcqProto::handleXtrazData(DWORD dwUin, char* szMsg, BOOL bThruDC)
szWork = strstrnull(szUrl, ".html");
if (szWork) {
mir_strcpy(szWork, ".php");
- strcat(szWork, szWork + 5);
+ mir_strcat(szWork, szWork + 5);
}
while (szWork = strstrnull(szUrl, "&amp;")) // unescape &amp; code
mir_strcpy(szWork + 1, szWork + 5);
szWork = (char*)SAFE_MALLOC(nDataLen + MAX_PATH);
ICQTranslateUtfStatic(LPGEN("Greeting card:"), szWork, MAX_PATH);
- strcat(szWork, "\r\nhttp://www.icq.com/friendship/pages/view_page_");
- strcat(szWork, szNum);
+ mir_strcat(szWork, "\r\nhttp://www.icq.com/friendship/pages/view_page_");
+ mir_strcat(szWork, szNum);
// Create message to notify user
PROTORECVEVENT pre = { 0 };
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index 12edd8348b..a229dda6a3 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -873,7 +873,7 @@ HANDLE CIcqProto::oftFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR
if (ft->szThisPath) { // Append Directory name to the save path, when transfering a directory
ft->szSavePath = (char*)SAFE_REALLOC(ft->szSavePath, mir_strlen(ft->szSavePath) + mir_strlen(ft->szThisPath) + 4);
NormalizeBackslash(ft->szSavePath);
- strcat(ft->szSavePath, ft->szThisPath);
+ mir_strcat(ft->szSavePath, ft->szThisPath);
NormalizeBackslash(ft->szSavePath);
}
@@ -1755,13 +1755,13 @@ void CIcqProto::handleOFT2FramePacket(oscar_connection *oc, WORD datatype, BYTE
char *szFullPath = (char*)SAFE_MALLOC(mir_strlen(ft->szSavePath) + mir_strlen(ft->szThisPath) + mir_strlen(ft->szThisFile) + 3);
mir_strcpy(szFullPath, ft->szSavePath);
NormalizeBackslash(szFullPath);
- strcat(szFullPath, ft->szThisPath);
+ mir_strcat(szFullPath, ft->szThisPath);
NormalizeBackslash(szFullPath);
// make sure the dest dir exists
if (MakeDirUtf(szFullPath))
NetLog_Direct("Failed to create destination directory!");
- strcat(szFullPath, ft->szThisFile);
+ mir_strcat(szFullPath, ft->szThisFile);
// we joined the full path to dest file
SAFE_FREE(&ft->szThisFile);
ft->szThisFile = szFullPath;
@@ -2040,7 +2040,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc)
char *pszThisFileName = (char*)SAFE_MALLOC(mir_strlen(ft->szThisFile) + mir_strlen(szThisContainer) + 4);
mir_strcpy(pszThisFileName, szThisContainer);
NormalizeBackslash(pszThisFileName);
- strcat(pszThisFileName, ExtractFileName(ft->szThisFile));
+ mir_strcat(pszThisFileName, ExtractFileName(ft->szThisFile));
// convert backslashes to dir markings
for (size_t i = 0; i < mir_strlen(pszThisFileName); i++)
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp
index 54b76ff356..3ea12a967b 100644
--- a/protocols/IcqOscarJ/src/stdpackets.cpp
+++ b/protocols/IcqOscarJ/src/stdpackets.cpp
@@ -990,9 +990,9 @@ void CIcqProto::icq_sendAwayMsgReplyServExt(DWORD dwUin, char *szUID, DWORD dwMs
char *mng = MangleXml(pszMsg, mir_strlen(pszMsg));
pszMsg = (char*)SAFE_MALLOC(mir_strlen(mng) + 28);
mir_strcpy(pszMsg, "<HTML><BODY>"); /// TODO: add support for RTL & user customizable font
- strcat(pszMsg, mng);
+ mir_strcat(pszMsg, mng);
SAFE_FREE(&mng);
- strcat(pszMsg, "</BODY></HTML>");
+ mir_strcat(pszMsg, "</BODY></HTML>");
// limit msg len to max snac size - we get disconnected if exceeded /// FIXME: correct HTML cutting
size_t wMsgLen = mir_strlen(pszMsg);
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index d68dbeba91..af56e712b3 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -98,7 +98,7 @@ static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, MCONTACT hContac
if (hContact && ppro->IsDirectConnectionOpen(hContact, DIRECTCONN_STANDARD, 1)) {
ICQTranslateUtfStatic(LPGEN(" (DC Established)"), szExtra, SIZEOF(szExtra));
- strcat(str, (char*)szExtra);
+ mir_strcat(str, (char*)szExtra);
bUtf = 1;
}
}
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index 7696a4d673..e8282c00bd 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -573,8 +573,8 @@ static int CopyCookies(NETLIBHTTPREQUEST *nlhrReply, NETLIBHTTPHEADER *hdr)
continue;
if (p=strchr(nlhrReply->headers[i].szValue, ';')) *p=0;
if (hdr) {
- if (*hdr->szValue) strcat (hdr->szValue, "; ");
- strcat (hdr->szValue, nlhrReply->headers[i].szValue);
+ if (*hdr->szValue) mir_strcat (hdr->szValue, "; ");
+ mir_strcat (hdr->szValue, nlhrReply->headers[i].szValue);
}
else nSize += (int)mir_strlen(nlhrReply->headers[i].szValue) + 2;
}
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 0169140612..f52e6a826e 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -729,7 +729,7 @@ int ThreadData::sendPacket(const char* cmd, const char* fmt, ...)
}
if (strchr(str, '\r') == NULL)
- strcat(str, "\r\n");
+ mir_strcat(str, "\r\n");
int result = send(str, mir_strlen(str));
mir_free(str);
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp
index 948e466fb9..fbaa187a5c 100644
--- a/protocols/MSN/src/msn_p2p.cpp
+++ b/protocols/MSN/src/msn_p2p.cpp
@@ -115,13 +115,13 @@ bool CMsnProto::p2p_createListener(filetransfer* ft, directconnection *dc, MimeH
NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0);
for (unsigned i = 0; i < ihaddr->cbNum; ++i) {
if (strchr(ihaddr->szIp[i], ':')) {
- if (i6++ != 0) strcat(szIpv6, " ");
- strcat(szIpv6, ihaddr->szIp[i]);
+ if (i6++ != 0) mir_strcat(szIpv6, " ");
+ mir_strcat(szIpv6, ihaddr->szIp[i]);
}
else {
- if (i4++ != 0) strcat(szIpv4, " ");
+ if (i4++ != 0) mir_strcat(szIpv4, " ");
ipInt |= (mir_strcmp(ihaddr->szIp[i], szExtIp) == 0);
- strcat(szIpv4, ihaddr->szIp[i]);
+ mir_strcat(szIpv4, ihaddr->szIp[i]);
}
}
mir_free(ihaddr);
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp
index e6b0332ebb..c90fd4263a 100644
--- a/protocols/Sametime/src/files.cpp
+++ b/protocols/Sametime/src/files.cpp
@@ -150,7 +150,7 @@ void mwFileTransfer_closed(mwFileTransfer* ft, guint32 code)
char fn[MAX_PATH];
if (ftcd->save_path) mir_strcpy(fn, ftcd->save_path);
else fn[0] = 0;
- strcat(fn, mwFileTransfer_getFileName(ft));
+ mir_strcat(fn, mwFileTransfer_getFileName(ft));
DeleteFileA(fn);
}
@@ -377,8 +377,8 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s
else
fp[0] = 0;
- if (fn) strcat(fp, fn);
- else strcat(fp, mwFileTransfer_getFileName(ft));
+ if (fn) mir_strcat(fp, fn);
+ else mir_strcat(fp, mwFileTransfer_getFileName(ft));
ftcd->hFile = CreateFileA(fp, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, 0, 0);
if (ftcd->hFile == INVALID_HANDLE_VALUE) {
diff --git a/protocols/SkypeClassic/src/filexfer.cpp b/protocols/SkypeClassic/src/filexfer.cpp
index f24e7273a7..313af9a315 100644
--- a/protocols/SkypeClassic/src/filexfer.cpp
+++ b/protocols/SkypeClassic/src/filexfer.cpp
@@ -78,10 +78,10 @@ INT_PTR SkypeSendFile(WPARAM, LPARAM lParam)
utfmsg = (char*)make_utf8_string(files[nFiles]);
iLen += mir_strlen(utfmsg) + 3;
if (pszFile = pszFile ? (char*)realloc(pszFile, iLen) : (char*)calloc(1, iLen)) {
- if (nFiles > 0) strcat(pszFile, ",");
- strcat(pszFile, "\"");
- strcat(pszFile, utfmsg);
- strcat(pszFile, "\"");
+ if (nFiles > 0) mir_strcat(pszFile, ",");
+ mir_strcat(pszFile, "\"");
+ mir_strcat(pszFile, utfmsg);
+ mir_strcat(pszFile, "\"");
}
free(utfmsg);
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp
index 5d867494c0..ad6bc71967 100644
--- a/protocols/SkypeClassic/src/skypeapi.cpp
+++ b/protocols/SkypeClassic/src/skypeapi.cpp
@@ -710,7 +710,7 @@ INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam) {
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
msg=(char *)malloc(mir_strlen(dbv.pszVal)+6);
mir_strcpy(msg, "CALL ");
- strcat(msg, dbv.pszVal);
+ mir_strcat(msg, dbv.pszVal);
res=SkypeSend(msg);
}
db_free(&dbv);
@@ -748,7 +748,7 @@ INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam)
// if (db_get(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
// msg=(char *)malloc(mir_strlen(dbv.pszVal)+6);
// mir_strcpy(msg, "CALL ");
- // strcat(msg, dbv.pszVal);
+ // mir_strcat(msg, dbv.pszVal);
// res=SkypeSend(msg);
return res;
}
@@ -865,7 +865,7 @@ static INT_PTR CALLBACK DialDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
if (!db_set_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", number)) {
msg=(char *)malloc(mir_strlen(number)+6);
mir_strcpy(msg, "CALL ");
- strcat(msg, number);
+ mir_strcat(msg, number);
if (SkypeSend(msg) || (ptr=SkypeRcv("ERROR", 500))) {
db_unset(hContact, SKYPE_PROTONAME, "SkypeOutNr");
if (ptr) {
@@ -1173,7 +1173,7 @@ INT_PTR SkypeSetAvatar(WPARAM wParam, LPARAM lParam) {
{
strncpy(OldAvatarFile, dbv.pszVal, sizeof(OldAvatarFile)-4);
OldAvatarFile[sizeof(OldAvatarFile)-5] = '\0';
- strcat(OldAvatarFile, "_old");
+ mir_strcat(OldAvatarFile, "_old");
DeleteFileA(OldAvatarFile);
if (!MoveFileA(dbv.pszVal, OldAvatarFile))
{
@@ -1440,7 +1440,7 @@ void TranslateMirandaRelativePathToAbsolute(LPCSTR cszPath, LPSTR szAbsolutePath
if(fQuoteSpaces && strchr((LPCSTR)szAbsolutePath, ' ')){
memmove (szAbsolutePath+1, szAbsolutePath, mir_strlen(szAbsolutePath)+1);
*szAbsolutePath='"';
- strcat (szAbsolutePath, "\"");
+ mir_strcat (szAbsolutePath, "\"");
}
TRACEA(szAbsolutePath);
@@ -1458,8 +1458,8 @@ static int my_spawnv(const char *cmdname, const char *const *argv, PROCESS_INFOR
iLen += (int)mir_strlen(argv[i])+1;
if (!(CommandLine = (char*)calloc(1, iLen))) return -1;
for (i=0; argv[i]; i++) {
- if (i) strcat (CommandLine, " ");
- strcat (CommandLine, argv[i]);
+ if (i) mir_strcat (CommandLine, " ");
+ mir_strcat (CommandLine, argv[i]);
}
si.cb = sizeof(si);
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp
index d46f6a2b87..358a95e153 100644
--- a/protocols/SkypeClassic/src/skypeopt.cpp
+++ b/protocols/SkypeClassic/src/skypeopt.cpp
@@ -901,7 +901,7 @@ void DoAutoDetect(HWND dlg)
return;
}
- strcat(basePath,"\\Skype\\");
+ mir_strcat(basePath,"\\Skype\\");
sprintf (fileName, "%s\\shared.xml", basePath);
if (f1 = ezxml_parse_file(fileName))
diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp
index aaa8aa8ccd..71ad60185f 100644
--- a/protocols/Tlen/src/tlen_file.cpp
+++ b/protocols/Tlen/src/tlen_file.cpp
@@ -82,8 +82,8 @@ static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft)
fullFileName = (char *) mir_alloc(mir_strlen(ft->szSavePath) + mir_strlen(ft->files[ft->currentFile]) + 2);
mir_strcpy(fullFileName, ft->szSavePath);
if (fullFileName[mir_strlen(fullFileName)-1] != '\\')
- strcat(fullFileName, "\\");
- strcat(fullFileName, ft->files[ft->currentFile]);
+ mir_strcat(fullFileName, "\\");
+ mir_strcat(fullFileName, ft->files[ft->currentFile]);
ft->fileId = _open(fullFileName, _O_BINARY|_O_WRONLY|_O_CREAT|_O_TRUNC, _S_IREAD|_S_IWRITE);
ft->fileReceivedBytes = 0;
ft->fileTotalSize = ft->filesSize[ft->currentFile];
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 3c31a9a097..f614b0a323 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -565,9 +565,9 @@ static void TlenProcessIqGetVersion(TlenProtocol *proto, XmlNode *node)
mir_strcpy(mversion, "Miranda NG ");
CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof( mversion ) - 11, ( LPARAM )mversion + 11 );
- strcat(mversion, " (Tlen v.");
- strcat(mversion, TLEN_VERSION_STRING);
- strcat(mversion, ")");
+ mir_strcat(mversion, " (Tlen v.");
+ mir_strcat(mversion, TLEN_VERSION_STRING);
+ mir_strcat(mversion, ")");
mver = TlenTextEncode( mversion );
TlenSend( proto, "<message to='%s' type='iq'><iq type='result'><query xmlns='jabber:iq:version'><name>%s</name><version>%s</version><os>%s</os></query></iq></message>", from, mver?mver:"", version?version:"", os?os:"" );
if (!item->versionRequested) {
@@ -1132,8 +1132,8 @@ static void TlenProcessP(XmlNode *node, ThreadData *info)
iStr = TlenXmlGetAttrValue(iNode, "i");
temp = (char*)mir_alloc(mir_strlen(f)+mir_strlen(iStr)+2);
mir_strcpy(temp, f);
- strcat(temp, "/");
- strcat(temp, iStr);
+ mir_strcat(temp, "/");
+ mir_strcat(temp, iStr);
f = TlenTextDecode(temp);
mir_free(temp);
node = iNode;
diff --git a/protocols/Xfire/src/SHA1.cpp b/protocols/Xfire/src/SHA1.cpp
index 0c1dc41a5b..49ac7ab1aa 100644
--- a/protocols/Xfire/src/SHA1.cpp
+++ b/protocols/Xfire/src/SHA1.cpp
@@ -230,23 +230,23 @@ void CSHA1::ReportHash(char *szReport, unsigned char uReportType)
if (uReportType == REPORT_HEX)
{
mir_snprintf(szTemp, SIZEOF(szTemp), "%02X", m_digest[0]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
mir_snprintf(szTemp, SIZEOF(szTemp), " %02X", m_digest[i]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
}
}
else if (uReportType == REPORT_DIGIT)
{
mir_snprintf(szTemp, SIZEOF(szTemp), "%u", m_digest[0]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
mir_snprintf(szTemp, SIZEOF(szTemp), " %u", m_digest[i]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
}
}
else mir_strcpy(szReport, "Error: Unknown report type!");
diff --git a/protocols/Xfire/src/SHA1.h b/protocols/Xfire/src/SHA1.h
index a64c8b589b..c1d720d8a5 100644
--- a/protocols/Xfire/src/SHA1.h
+++ b/protocols/Xfire/src/SHA1.h
@@ -27,7 +27,7 @@
#include <stdio.h> // Needed for file access
#include <memory.h> // Needed for memset and memcpy
-#include <string.h> // Needed for strcat and mir_strcpy
+#include <string.h> // Needed for mir_strcat and mir_strcpy
#include <iostream>
#include <stdlib.h>
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index 31d43319e5..87c0a4d2b9 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -430,7 +430,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid)
{
char servicefunction[100];
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartGame%d");
+ mir_strcat(servicefunction, "StartGame%d");
if (dbid < 0)
dbid = pos;
diff --git a/protocols/Xfire/src/clientloginpacket.cpp b/protocols/Xfire/src/clientloginpacket.cpp
index 97c1478ceb..75ccf09e2d 100644
--- a/protocols/Xfire/src/clientloginpacket.cpp
+++ b/protocols/Xfire/src/clientloginpacket.cpp
@@ -113,7 +113,7 @@ void ClientLoginPacket::hashSha1(const char *string, unsigned char *sha){
char szTemp[16];
for(int i = 0 ; i < 20 ; i++) {
mir_snprintf(szTemp, SIZEOF(szTemp), "%02x", temp[i]);
- strcat(result,szTemp);
+ mir_strcat(result,szTemp);
}
memcpy(sha,result,40);
sha[40] = 0x00;
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 5b23f979f2..0978600aaf 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1092,7 +1092,7 @@ extern "C" __declspec(dllexport) int Load(void)
char CurProfileF[MAX_PATH] = "";
char CurProfile[MAX_PATH] = "";
CallService(MS_DB_GETPROFILEPATH, (WPARAM)MAX_PATH, (LPARAM)AvatarsFolder);
- strcat(AvatarsFolder, "\\");
+ mir_strcat(AvatarsFolder, "\\");
CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)CurProfileF);
int i;
@@ -1103,15 +1103,15 @@ extern "C" __declspec(dllexport) int Load(void)
}
}
memcpy(CurProfile, CurProfileF, i);
- strcat(AvatarsFolder, CurProfile);
- strcat(AvatarsFolder, "\\");
- strcat(AvatarsFolder, "XFire");
+ mir_strcat(AvatarsFolder, CurProfile);
+ mir_strcat(AvatarsFolder, "\\");
+ mir_strcat(AvatarsFolder, "XFire");
XFireWorkingFolder = FoldersRegisterCustomPath(protocolname, "Working Folder", AvatarsFolder);
if (!(XFireIconFolder = FoldersRegisterCustomPath(protocolname, "Game Icon Folder", AvatarsFolder)))
CreateDirectoryA(AvatarsFolder, NULL);
- strcat(AvatarsFolder, "\\Avatars");
+ mir_strcat(AvatarsFolder, "\\Avatars");
if (!(XFireAvatarFolder = FoldersRegisterCustomPath(protocolname, "Avatars", AvatarsFolder)))
CreateDirectoryA(AvatarsFolder, NULL);
@@ -1124,7 +1124,7 @@ extern "C" __declspec(dllexport) int Load(void)
//gotoprofilemenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile");
+ mir_strcat(servicefunction, "GotoProfile");
CreateServiceFunction(servicefunction, GotoProfile);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1135,7 +1135,7 @@ extern "C" __declspec(dllexport) int Load(void)
//gotoxfireclansitemenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoXFireClanSite");
+ mir_strcat(servicefunction, "GotoXFireClanSite");
CreateServiceFunction(servicefunction, GotoXFireClanSite);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1146,7 +1146,7 @@ extern "C" __declspec(dllexport) int Load(void)
//kopiermenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GetIPPort");
+ mir_strcat(servicefunction, "GetIPPort");
CreateServiceFunction(servicefunction, GetIPPort);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1157,7 +1157,7 @@ extern "C" __declspec(dllexport) int Load(void)
//kopiermenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "VoiceIPPort");
+ mir_strcat(servicefunction, "VoiceIPPort");
CreateServiceFunction(servicefunction, GetVIPPort);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1168,7 +1168,7 @@ extern "C" __declspec(dllexport) int Load(void)
//joinmenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "JoinGame");
+ mir_strcat(servicefunction, "JoinGame");
CreateServiceFunction(servicefunction, JoinGame);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1179,7 +1179,7 @@ extern "C" __declspec(dllexport) int Load(void)
//joinmenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartThisGame");
+ mir_strcat(servicefunction, "StartThisGame");
CreateServiceFunction(servicefunction, StartThisGame);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1190,7 +1190,7 @@ extern "C" __declspec(dllexport) int Load(void)
//remove friend
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "RemoveFriend");
+ mir_strcat(servicefunction, "RemoveFriend");
CreateServiceFunction(servicefunction, RemoveFriend);
mi.pszService = servicefunction;
mi.position = 2000070000;
@@ -1201,7 +1201,7 @@ extern "C" __declspec(dllexport) int Load(void)
//block user
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "BlockFriend");
+ mir_strcat(servicefunction, "BlockFriend");
CreateServiceFunction(servicefunction, BlockFriend);
mi.pszService = servicefunction;
mi.position = 2000070000;
@@ -1212,7 +1212,7 @@ extern "C" __declspec(dllexport) int Load(void)
//my fire profile
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile2");
+ mir_strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1223,7 +1223,7 @@ extern "C" __declspec(dllexport) int Load(void)
//my activity protocol
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfileAct");
+ mir_strcat(servicefunction, "GotoProfileAct");
CreateServiceFunction(servicefunction, GotoProfileAct);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1234,7 +1234,7 @@ extern "C" __declspec(dllexport) int Load(void)
//rescan my games
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "ReScanMyGames");
+ mir_strcat(servicefunction, "ReScanMyGames");
CreateServiceFunction(servicefunction, ReScanMyGames);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1244,7 +1244,7 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddMainMenuItem(&mi);
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "SetNick");
+ mir_strcat(servicefunction, "SetNick");
CreateServiceFunction(servicefunction, SetNickDlg);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1876,7 +1876,7 @@ BOOL GetAvatar(char* username, XFireAvatar* av)
{
char filename[512];
mir_strcpy(filename, XFireGetFoldersPath("Avatar"));
- strcat(filename, username);
+ mir_strcat(filename, username);
pos++;
//gif?!?!
@@ -1885,12 +1885,12 @@ BOOL GetAvatar(char* username, XFireAvatar* av)
*(pos + 2) == 'f')
{
av->type = PA_FORMAT_GIF;
- strcat(filename, ".gif");
+ mir_strcat(filename, ".gif");
}
else//dann kanns nur jpg sein
{
av->type = PA_FORMAT_JPEG;
- strcat(filename, ".jpg");
+ mir_strcat(filename, ".jpg");
}
//verusch das bild runterladen
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp
index e57aee4848..4ac8fd4cd4 100644
--- a/protocols/Xfire/src/options.cpp
+++ b/protocols/Xfire/src/options.cpp
@@ -579,7 +579,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
TranslateDialogDefault(hwndDlg);
mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
- strcat(inipath, "xfire_games.ini");
+ mir_strcat(inipath, "xfire_games.ini");
FILE * f = fopen(inipath, "r");
if (f != NULL)
@@ -595,7 +595,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
}
mir_strcpy(inipath, XFireGetFoldersPath("IconsFile"));
- strcat(inipath, "icons.dll");
+ mir_strcat(inipath, "icons.dll");
f = fopen(inipath, "r");
if (f != NULL)
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp
index c0fd32c751..a788f2e7ca 100644
--- a/protocols/Xfire/src/processbuddyinfo.cpp
+++ b/protocols/Xfire/src/processbuddyinfo.cpp
@@ -54,8 +54,8 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
switch (buddyinfo->avatarmode) {
case 1:
- strcat(filename, username);
- strcat(filename, ".gif");
+ mir_strcat(filename, username);
+ mir_strcat(filename, ".gif");
type = PA_FORMAT_GIF;
mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/%03d.gif", buddyinfo->avatarid);
@@ -63,8 +63,8 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
dl = GetWWWContent("media.xfire.com", temp, filename, FALSE);
break;
case 2:
- strcat(filename, username);
- strcat(filename, ".jpg");
+ mir_strcat(filename, username);
+ mir_strcat(filename, ".jpg");
type = PA_FORMAT_JPEG;
mir_snprintf(temp, SIZEOF(temp), "/avatar/100/%s.jpg?%d", username, buddyinfo->avatarid);
@@ -73,7 +73,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
break;
case 3:
type = PA_FORMAT_GIF;
- strcat(filename, "xfire.gif");
+ mir_strcat(filename, "xfire.gif");
mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/xfire.gif", buddyinfo->avatarid);
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp
index 80bf55faf0..d04686ea12 100644
--- a/protocols/Xfire/src/searching4games.cpp
+++ b/protocols/Xfire/src/searching4games.cpp
@@ -243,7 +243,7 @@ void Scan4Games(LPVOID lparam)
}
mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
- strcat(inipath, "xfire_games.ini");
+ mir_strcat(inipath, "xfire_games.ini");
//erstmal db säubern
xgamelist.clearDatabase();
@@ -329,9 +329,9 @@ void Scan4Games(LPVOID lparam)
if (xfire_GetPrivateProfileString(temp, "LauncherDirAppend", "", ret2, 255, inipath))
{
if (*(path + mir_strlen(path) - 1) == '\\'&&*(ret2) == '\\')
- strcat(path, (ret2 + 1));
+ mir_strcat(path, (ret2 + 1));
else
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
if (xfire_GetPrivateProfileString(temp, "LauncherDirTruncAt", "", ret2, 255, inipath))
@@ -355,7 +355,7 @@ void Scan4Games(LPVOID lparam)
}
if (*(path + mir_strlen(path) - 1) != '\\')
- strcat(path, "\\");
+ mir_strcat(path, "\\");
//dateiname auslesen
@@ -363,7 +363,7 @@ void Scan4Games(LPVOID lparam)
{
char pathtemp[XFIRE_MAX_STATIC_STRING_LEN];
mir_strcpy(pathtemp, path);
- strcat(pathtemp, ret2);
+ mir_strcat(pathtemp, ret2);
if (CheckPath(pathtemp))
{
@@ -375,11 +375,11 @@ void Scan4Games(LPVOID lparam)
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret[0] == '\\')
{
- strcat(pathtemp, (char*)&ret[1]);
+ mir_strcat(pathtemp, (char*)&ret[1]);
}
else
{
- strcat(pathtemp, ret);
+ mir_strcat(pathtemp, ret);
}
if (CheckPath(pathtemp))
@@ -394,7 +394,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
}
else
@@ -405,7 +405,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "DetectExe[0]", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
multiexe = TRUE;
if (!CheckPath(path, path_r))
{
@@ -419,11 +419,11 @@ void Scan4Games(LPVOID lparam)
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret2[0] == '\\')
{
- strcat(path, (char*)&ret2[1]);
+ mir_strcat(path, (char*)&ret2[1]);
}
else
{
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
if (!CheckPath(path, path_r))
@@ -434,7 +434,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
@@ -476,7 +476,7 @@ void Scan4Games(LPVOID lparam)
pos++;
*pos = 0;
}
- strcat(path, ret2);
+ mir_strcat(path, ret2);
if (!CheckPath(path))
{
*(path) = 0;
@@ -510,7 +510,7 @@ void Scan4Games(LPVOID lparam)
//letzten backslash entfernen
if (launchpath[mir_strlen(launchpath) - 1] == '\\') launchpath[mir_strlen(launchpath) - 1] = 0;
- strcat(path, ret2);
+ mir_strcat(path, ret2);
newgame->setString(path, &newgame->launchparams);
newgame->appendString(" ", &newgame->launchparams);
@@ -566,10 +566,10 @@ void Scan4Games(LPVOID lparam)
newgame->setNameandIcon();
- strcat(gamelist, gamename);
- strcat(gamelist, ", ");
+ mir_strcat(gamelist, gamename);
+ mir_strcat(gamelist, ", ");
if (foundgames % 2 == 1)
- strcat(gamelist, "\r\n");
+ mir_strcat(gamelist, "\r\n");
xgamelist.Addgame(newgame);
@@ -589,8 +589,8 @@ void Scan4Games(LPVOID lparam)
{
if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret, 255, inipath))
{
- strcat(ret2, "\\");
- strcat(ret2, ret);
+ mir_strcat(ret2, "\\");
+ mir_strcat(ret2, ret);
}
str_replace(ret2, "%WINDIR%", getenv("WINDIR"));
@@ -668,10 +668,10 @@ void Scan4Games(LPVOID lparam)
newgame->setNameandIcon();
- strcat(gamelist, gamename);
- strcat(gamelist, ", ");
+ mir_strcat(gamelist, gamename);
+ mir_strcat(gamelist, ", ");
if (foundgames % 2 == 1)
- strcat(gamelist, "\r\n");
+ mir_strcat(gamelist, "\r\n");
xgamelist.Addgame(newgame);
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 3b1427d3af..05658e1ac8 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -70,8 +70,8 @@ BOOL str_replace(char*src, char*find, char*rep)
mir_strcpy(temp, src);
*(temp + pos) = 0;
- strcat(temp, rep);
- strcat(temp, (src + pos + mir_strlen(find)));
+ mir_strcat(temp, rep);
+ mir_strcat(temp, (src + pos + mir_strlen(find)));
mir_strcpy(src, temp);
delete[] temp;
@@ -995,8 +995,8 @@ BOOL GetWWWContent2(char*address, char*filename, BOOL dontoverwrite, char**tobuf
//eigener www downloader, da winet exceptions erzeugt
BOOL GetWWWContent(char*host, char* request, char*filename, BOOL dontoverwrite) {
char add[1024] = "http://";
- strcat(add, host);
- strcat(add, request);
+ mir_strcat(add, host);
+ mir_strcat(add, request);
return GetWWWContent2(add, filename, dontoverwrite);
}
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp
index 1cf26c35be..70f167e933 100644
--- a/protocols/Xfire/src/variables.cpp
+++ b/protocols/Xfire/src/variables.cpp
@@ -174,7 +174,7 @@ char* XFireGetFoldersPath(char * pathtype)
if (!mir_strcmp(pathtype, "IconsFile")){
FoldersGetCustomPath(XFireIconFolder, path, 1024, "");
}
- strcat(path, "\\");
+ mir_strcat(path, "\\");
return path;
}
else {
@@ -183,7 +183,7 @@ char* XFireGetFoldersPath(char * pathtype)
char CurProfileF[MAX_PATH] = "";
char CurProfile[MAX_PATH] = "";
CallService(MS_DB_GETPROFILEPATH, (WPARAM)MAX_PATH, (LPARAM)BaseFolder);
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "\\");
CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)CurProfileF);
int i;
for (i = MAX_PATH - 1; i > 5; i--){
@@ -193,16 +193,16 @@ char* XFireGetFoldersPath(char * pathtype)
}
}
memcpy(CurProfile, CurProfileF, i);
- strcat(BaseFolder, CurProfile);
- strcat(BaseFolder, "\\");
- strcat(BaseFolder, "XFire");
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, CurProfile);
+ mir_strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "XFire");
+ mir_strcat(BaseFolder, "\\");
/*******BASE********/
if (!mir_strcmp(pathtype, "Avatar")){
- strcat(BaseFolder, "Avatars");
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "Avatars");
+ mir_strcat(BaseFolder, "\\");
}
- strcat(path, BaseFolder);
+ mir_strcat(path, BaseFolder);
}
return path;
}
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
index cd76a77ba7..659cb4e6a9 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
@@ -50,7 +50,7 @@ char * y_string_append(char * string, char * append)
FREE(string);
}
- strcat(new_string, append);
+ mir_strcat(new_string, append);
return new_string;
}