summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
commitbabf7873a3fe373d60ef22b1b671d98e014d8819 (patch)
treee21dfdb68839616efbbd884dfa77a1745f1c35d7 /protocols/IcqOscarJ/src
parenta89887eb202c99ce09107668561abce6704f9004 (diff)
replace strcpy to mir_strcpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src')
-rw-r--r--protocols/IcqOscarJ/src/db.cpp2
-rw-r--r--protocols/IcqOscarJ/src/dlgproc.cpp2
-rw-r--r--protocols/IcqOscarJ/src/fam_04message.cpp32
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_clients.cpp46
-rw-r--r--protocols/IcqOscarJ/src/icq_db.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_filetransfer.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_firstrun.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp14
-rw-r--r--protocols/IcqOscarJ/src/icq_opts.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_popups.cpp8
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp20
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp10
-rw-r--r--protocols/IcqOscarJ/src/icq_xtraz.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp2
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp16
-rw-r--r--protocols/IcqOscarJ/src/stdpackets.cpp2
-rw-r--r--protocols/IcqOscarJ/src/upload.cpp4
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp2
20 files changed, 92 insertions, 92 deletions
diff --git a/protocols/IcqOscarJ/src/db.cpp b/protocols/IcqOscarJ/src/db.cpp
index 1d4254b52e..a17d929da8 100644
--- a/protocols/IcqOscarJ/src/db.cpp
+++ b/protocols/IcqOscarJ/src/db.cpp
@@ -190,7 +190,7 @@ int ChangeInfoData::SaveSettingsToDb(HWND hwndDlg)
ret = 0;
break;
}
- strcpy(ppro->m_szPassword, (char*)sid.value);
+ mir_strcpy(ppro->m_szPassword, (char*)sid.value);
}
else {
if (*(char*)sid.value)
diff --git a/protocols/IcqOscarJ/src/dlgproc.cpp b/protocols/IcqOscarJ/src/dlgproc.cpp
index f747a3d381..041333468c 100644
--- a/protocols/IcqOscarJ/src/dlgproc.cpp
+++ b/protocols/IcqOscarJ/src/dlgproc.cpp
@@ -221,7 +221,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
dat->LoadSettingsFromDb(0);
{
char *pwd = dat->ppro->GetUserPassword(TRUE);
- strcpy(dat->Password, (pwd) ? pwd : ""); /// FIXME
+ mir_strcpy(dat->Password, (pwd) ? pwd : ""); /// FIXME
}
break;
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp
index f3f4808b6b..a9ca209a1e 100644
--- a/protocols/IcqOscarJ/src/fam_04message.cpp
+++ b/protocols/IcqOscarJ/src/fam_04message.cpp
@@ -1600,7 +1600,7 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
char *szDataDescr = ansi_to_utf8(pszMsgField[0]);
char *szDataUrl = ansi_to_utf8(pszMsgField[1]);
char *szBlob = (char *)SAFE_MALLOC(mir_strlen(szTitle) + mir_strlen(szDataDescr) + mir_strlen(szDataUrl) + 8);
- strcpy(szBlob, szTitle);
+ mir_strcpy(szBlob, szTitle);
strcat(szBlob, " ");
strcat(szBlob, szDataDescr); // Description
strcat(szBlob, "\r\n");
@@ -1632,11 +1632,11 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
char *szBlob, *pCurBlob = szBlob = (char *)_alloca(pre.lParam);
*(DWORD*)pCurBlob = dwUin; pCurBlob += sizeof(DWORD);
*(DWORD*)pCurBlob = DWORD(hContact); pCurBlob += sizeof(DWORD);
- strcpy((char*)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[1]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[2]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[3]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[5]);
+ mir_strcpy((char*)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[1]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[2]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[3]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[5]);
pre.szMessage = (char *)szBlob;
ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
}
@@ -1655,10 +1655,10 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
PBYTE pBlob, pCurBlob = pBlob = (PBYTE)_alloca(cbBlob);
*(DWORD*)pCurBlob = dwUin; pCurBlob += sizeof(DWORD);
*(DWORD*)pCurBlob = DWORD(hContact); pCurBlob += sizeof(DWORD);
- strcpy((char*)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[1]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[2]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
- strcpy((char*)pCurBlob, pszMsgField[3]);
+ mir_strcpy((char*)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[1]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[2]); pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ mir_strcpy((char*)pCurBlob, pszMsgField[3]);
AddEvent(NULL, EVENTTYPE_ADDED, dwTimestamp, 0, cbBlob, pBlob);
}
break;
@@ -1750,9 +1750,9 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
// blob is: body(ASCIIZ), name(ASCIIZ), email(ASCIIZ)
size_t cbBlob = mir_strlen(pszMsgField[0]) + mir_strlen(pszMsgField[3]) + mir_strlen(pszMsgField[5]) + 3;
PBYTE pBlob, pCurBlob = pBlob = (PBYTE)_alloca(cbBlob);
- strcpy((char *)pCurBlob, pszMsgField[5]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
- strcpy((char *)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
- strcpy((char *)pCurBlob, pszMsgField[3]);
+ mir_strcpy((char *)pCurBlob, pszMsgField[5]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
+ mir_strcpy((char *)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
+ mir_strcpy((char *)pCurBlob, pszMsgField[3]);
AddEvent(NULL, ICQEVENTTYPE_WEBPAGER, dwTimestamp, 0, cbBlob, pBlob);
}
@@ -1766,9 +1766,9 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
// blob is: body(ASCIIZ), name(ASCIIZ), email(ASCIIZ)
size_t cbBlob = mir_strlen(pszMsgField[0]) + mir_strlen(pszMsgField[3]) + mir_strlen(pszMsgField[5]) + 3;
PBYTE pBlob, pCurBlob = pBlob = (PBYTE)_alloca(cbBlob);
- strcpy((char *)pCurBlob, pszMsgField[5]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
- strcpy((char *)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
- strcpy((char *)pCurBlob, pszMsgField[3]);
+ mir_strcpy((char *)pCurBlob, pszMsgField[5]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
+ mir_strcpy((char *)pCurBlob, pszMsgField[0]); pCurBlob += mir_strlen((char *)pCurBlob) + 1;
+ mir_strcpy((char *)pCurBlob, pszMsgField[3]);
AddEvent(NULL, ICQEVENTTYPE_EMAILEXPRESS, dwTimestamp, 0, cbBlob, pBlob);
}
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index 645d5ec2c2..81ace619cb 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -528,7 +528,7 @@ int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid,
uid_str szUidData;
char *pszUid = NULL;
if (!dwUin && szUid) { // create a copy in local writable buffer
- strcpy(szUidData, szUid);
+ mir_strcpy(szUidData, szUid);
pszUid = szUidData;
}
@@ -585,7 +585,7 @@ int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid,
ar->hContact = hContact;
ar->dwUin = dwUin;
if (!dwUin)
- strcpy(ar->szUid, szUid);
+ mir_strcpy(ar->szUid, szUid);
ar->hash = (BYTE*)SAFE_MALLOC(hashlen);
if (!ar->hash) { // alloc failed
delete ar;
diff --git a/protocols/IcqOscarJ/src/icq_clients.cpp b/protocols/IcqOscarJ/src/icq_clients.cpp
index 6d1cf74ea9..3ccce04839 100644
--- a/protocols/IcqOscarJ/src/icq_clients.cpp
+++ b/protocols/IcqOscarJ/src/icq_clients.cpp
@@ -57,7 +57,7 @@ static char* MirandaVersionToStringEx(char* szStr, int bUnicode, const char* szP
if (!v) // this is not Miranda
return NULL;
- strcpy(szStr, "Miranda IM ");
+ mir_strcpy(szStr, "Miranda IM ");
if (!m && v == 1)
verToStr(szStr, 0x80010200);
@@ -272,7 +272,7 @@ const char* CIcqProto::detectUserClient(
else if (dwFT1 == 0x66666666 && dwFT3 == 0x66666666) {
// http://darkjimm.ucoz.ru/
if (dwFT2 == 0x10000) {
- strcpy(szClientBuf, "D[i]Chat v.");
+ mir_strcpy(szClientBuf, "D[i]Chat v.");
strcat(szClientBuf, "0.1a");
}
else {
@@ -471,7 +471,7 @@ const char* CIcqProto::detectUserClient(
else if (MatchCapability(caps, wLen, &capQipMobile))
szClient = "QIP Mobile (Java)";
else if (MatchCapability(caps, wLen, &capQipInfium)) {
- strcpy(szClientBuf, "QIP Infium");
+ mir_strcpy(szClientBuf, "QIP Infium");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
strcat(szClientBuf, ver);
@@ -482,7 +482,7 @@ const char* CIcqProto::detectUserClient(
szClient = szClientBuf;
}
else if (MatchCapability(caps, wLen, &capQip2010, 12)) {
- strcpy(szClientBuf, "QIP 2010");
+ mir_strcpy(szClientBuf, "QIP 2010");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
strcat(szClientBuf, ver);
@@ -491,7 +491,7 @@ const char* CIcqProto::detectUserClient(
szClient = szClientBuf;
}
else if (MatchCapability(caps, wLen, &capQip2012, 12)) {
- strcpy(szClientBuf, "QIP 2012");
+ mir_strcpy(szClientBuf, "QIP 2012");
if (dwFT1) {
mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
strcat(szClientBuf, ver);
@@ -501,7 +501,7 @@ const char* CIcqProto::detectUserClient(
}
else if (capId = MatchCapability(caps, wLen, &capQip, 0xE)) {
if (dwFT3 == 0x0F)
- strcpy(ver, "2005");
+ mir_strcpy(ver, "2005");
else
null_strcpy(ver, (char*)(*capId) + 11, 5);
@@ -513,18 +513,18 @@ const char* CIcqProto::detectUserClient(
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capmChat, 0xA)) {
- strcpy(szClientBuf, "mChat ");
+ mir_strcpy(szClientBuf, "mChat ");
strncat(szClientBuf, (char*)(*capId) + 0xA, 6);
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capJimm, 5)) {
- strcpy(szClientBuf, "Jimm ");
+ mir_strcpy(szClientBuf, "Jimm ");
strncat(szClientBuf, (char*)(*capId) + 5, 11);
szClient = szClientBuf;
}
// http://corepager.net.ru/index/0-2
else if (capId = MatchCapability(caps, wLen, &capCorePager, 0xA)) {
- strcpy(szClientBuf, "CORE Pager");
+ mir_strcpy(szClientBuf, "CORE Pager");
if (dwFT2 == 0x0FFFF0011 && dwFT3 == 0x1100FFFF && (dwFT1 >> 0x18)) {
char ver[16];
@@ -537,7 +537,7 @@ const char* CIcqProto::detectUserClient(
}
// http://darkjimm.ucoz.ru/
else if (capId = MatchCapability(caps, wLen, &capDiChat, 9)) {
- strcpy(szClientBuf, "D[i]Chat");
+ mir_strcpy(szClientBuf, "D[i]Chat");
strncat(szClientBuf, (char*)(*capId) + 8, 8);
szClient = szClientBuf;
}
@@ -568,31 +568,31 @@ const char* CIcqProto::detectUserClient(
if (ver1 < 30)
makeClientVersion(szClientBuf, "MIP ", ver1, ver2, ver3, ver4);
else {
- strcpy(szClientBuf, "MIP ");
+ mir_strcpy(szClientBuf, "MIP ");
strncat(szClientBuf, (char*)(*capId) + 11, 5);
}
szClient = szClientBuf;
}
//http://mip.rufon.net - new signature
else if (capId = MatchCapability(caps, wLen, &capMipClient, 0x04)) {
- strcpy(szClientBuf, "MIP ");
+ mir_strcpy(szClientBuf, "MIP ");
strncat(szClientBuf, (char*)(*capId) + 4, 12);
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capVmIcq, 0x06)) {
- strcpy(szClientBuf, "VmICQ");
+ mir_strcpy(szClientBuf, "VmICQ");
strncat(szClientBuf, (char*)(*capId) + 5, 11);
szClient = szClientBuf;
}
// http://www.smape.com/smaper
else if (capId = MatchCapability(caps, wLen, &capSmapeR, 0x07)) {
- strcpy(szClientBuf, "SmapeR");
+ mir_strcpy(szClientBuf, "SmapeR");
strncat(szClientBuf, (char*)(*capId) + 6, 10);
szClient = szClientBuf;
}
// http://yapp.ru
else if (capId = MatchCapability(caps, wLen, &capYapp, 0x04)) {
- strcpy(szClientBuf, "Yapp! v");
+ mir_strcpy(szClientBuf, "Yapp! v");
strncat(szClientBuf, (char*)(*capId) + 8, 5);
szClient = szClientBuf;
}
@@ -639,7 +639,7 @@ const char* CIcqProto::detectUserClient(
}
// http://www.barobin.com/bayanICQ.html
else if (capId = MatchCapability(caps, wLen, &capBayan, 8)) {
- strcpy(szClientBuf, "bayanICQ ");
+ mir_strcpy(szClientBuf, "bayanICQ ");
strncat(szClientBuf, (char*)(*capId) + 8, 5);
szClient = szClientBuf;
}
@@ -730,21 +730,21 @@ const char* CIcqProto::detectUserClient(
// capable of tZers ?
if (MatchCapability(caps, wLen, &capIcqLiteNew) && MatchShortCapability(caps, wLen, &capStatusTextAware) &&
MatchShortCapability(caps, wLen, &capAimLiveVideo) && MatchShortCapability(caps, wLen, &capAimLiveAudio)) {
- strcpy(szClientBuf, "ICQ 7");
+ mir_strcpy(szClientBuf, "ICQ 7");
}
else if (MatchCapability(caps, wLen, &capFakeHtml)) {
if (MatchShortCapability(caps, wLen, &capAimLiveVideo) && MatchShortCapability(caps, wLen, &capAimLiveAudio)) {
- strcpy(szClientBuf, "ICQ 6");
+ mir_strcpy(szClientBuf, "ICQ 6");
*bClientId = CLID_ICQ6;
}
else if (CheckContactCapabilities(hContact, CAPF_RTF) && !CheckContactCapabilities(hContact, CAPF_CONTACTS) && MatchShortCapability(caps, wLen, &capIcqDevils)) {
- strcpy(szClientBuf, "Qnext v4"); // finally handles SRV_RELAY correctly
+ mir_strcpy(szClientBuf, "Qnext v4"); // finally handles SRV_RELAY correctly
*bClientId = CLID_ALTERNATIVE;
}
}
- else strcpy(szClientBuf, "icq5.1");
+ else mir_strcpy(szClientBuf, "icq5.1");
}
- else strcpy(szClientBuf, "icq5");
+ else mir_strcpy(szClientBuf, "icq5");
if (MatchCapability(caps, wLen, &capRambler))
strcat(szClientBuf, " (Rambler)");
@@ -947,7 +947,7 @@ const char* CIcqProto::detectUserClient(
// make sure client string is not constant
if (szClient != szClientBuf) {
- strcpy(szClientBuf, szClient);
+ mir_strcpy(szClientBuf, szClient);
szClient = szClientBuf;
}
@@ -990,7 +990,7 @@ const char* CIcqProto::detectUserClient(
if (szExtra) {
if (szClient != szClientBuf) {
- strcpy(szClientBuf, szClient);
+ mir_strcpy(szClientBuf, szClient);
szClient = szClientBuf;
}
strcat(szClientBuf, szExtra);
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp
index 971056a957..9cee69b5c1 100644
--- a/protocols/IcqOscarJ/src/icq_db.cpp
+++ b/protocols/IcqOscarJ/src/icq_db.cpp
@@ -73,7 +73,7 @@ int CIcqProto::getContactUid(MCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid)
case DBVT_ASCIIZ:
if (ppszUid && m_bAimEnabled) {
- strcpy(*ppszUid, dbv.pszVal);
+ mir_strcpy(*ppszUid, dbv.pszVal);
iRes = 0;
}
else debugLogA("AOL screennames not accepted");
@@ -81,7 +81,7 @@ int CIcqProto::getContactUid(MCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid)
case DBVT_UTF8:
if (ppszUid && m_bAimEnabled) {
- strcpy(*ppszUid, dbv.pszVal);
+ mir_strcpy(*ppszUid, dbv.pszVal);
mir_utf8decode(*ppszUid, NULL);
iRes = 0;
}
diff --git a/protocols/IcqOscarJ/src/icq_filetransfer.cpp b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
index 25bc45de50..25a4e2f820 100644
--- a/protocols/IcqOscarJ/src/icq_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
@@ -375,7 +375,7 @@ 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);
- strcpy(szFullPath, dc->ft->szSavePath);
+ mir_strcpy(szFullPath, dc->ft->szSavePath);
NormalizeBackslash(szFullPath);
strcat(szFullPath, dc->ft->szThisSubdir);
NormalizeBackslash(szFullPath);
diff --git a/protocols/IcqOscarJ/src/icq_firstrun.cpp b/protocols/IcqOscarJ/src/icq_firstrun.cpp
index e5761b6052..b223911eb4 100644
--- a/protocols/IcqOscarJ/src/icq_firstrun.cpp
+++ b/protocols/IcqOscarJ/src/icq_firstrun.cpp
@@ -90,7 +90,7 @@ INT_PTR CALLBACK icq_FirstRunDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ppro->setDword(UNIQUEIDSETTING, atoi(str));
GetDlgItemTextA(hwndDlg, IDC_PW, str, SIZEOF(ppro->m_szPassword));
- strcpy(ppro->m_szPassword, str);
+ mir_strcpy(ppro->m_szPassword, str);
ppro->setString("Password", str);
break;
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index e0a276de55..184ac57d19 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -109,13 +109,13 @@ void g_MenuInit(void)
// Contact menu initialization
char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
- strcpy(str, "ICQ");
+ mir_strcpy(str, "ICQ");
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = str;
// "Request authorization"
- strcpy(pszDest, MS_REQ_AUTH); CreateServiceFunction(str, IcqMenuHandleRequestAuth );
+ mir_strcpy(pszDest, MS_REQ_AUTH); CreateServiceFunction(str, IcqMenuHandleRequestAuth );
mi.pszName = LPGEN("Request authorization");
mi.position = 1000030000;
@@ -123,7 +123,7 @@ void g_MenuInit(void)
g_hContactMenuItems[ICMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
// "Grant authorization"
- strcpy(pszDest, MS_GRANT_AUTH); CreateServiceFunction(str, IcqMenuHandleGrantAuth);
+ mir_strcpy(pszDest, MS_GRANT_AUTH); CreateServiceFunction(str, IcqMenuHandleGrantAuth);
mi.pszName = LPGEN("Grant authorization");
mi.position = 1000029999;
@@ -131,7 +131,7 @@ void g_MenuInit(void)
g_hContactMenuItems[ICMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
// "Revoke authorization"
- strcpy(pszDest, MS_REVOKE_AUTH); CreateServiceFunction(str, IcqMenuHandleRevokeAuth);
+ mir_strcpy(pszDest, MS_REVOKE_AUTH); CreateServiceFunction(str, IcqMenuHandleRevokeAuth);
mi.pszName = LPGEN("Revoke authorization");
mi.position = 1000029998;
@@ -139,7 +139,7 @@ void g_MenuInit(void)
g_hContactMenuItems[ICMI_AUTH_REVOKE] = Menu_AddContactMenuItem(&mi);
// "Add to server list"
- strcpy(pszDest, MS_ICQ_ADDSERVCONTACT); CreateServiceFunction(str, IcqMenuHandleAddServContact);
+ mir_strcpy(pszDest, MS_ICQ_ADDSERVCONTACT); CreateServiceFunction(str, IcqMenuHandleAddServContact);
mi.pszName = LPGEN("Add to server list");
mi.position = -2049999999;
@@ -147,7 +147,7 @@ void g_MenuInit(void)
g_hContactMenuItems[ICMI_ADD_TO_SERVLIST] = Menu_AddContactMenuItem(&mi);
// "Show custom status details"
- strcpy(pszDest, MS_XSTATUS_SHOWDETAILS); CreateServiceFunction(str, IcqMenuHandleXStatusDetails);
+ mir_strcpy(pszDest, MS_XSTATUS_SHOWDETAILS); CreateServiceFunction(str, IcqMenuHandleXStatusDetails);
mi.pszName = LPGEN("Show custom status details");
mi.position = -2000004999;
@@ -155,7 +155,7 @@ void g_MenuInit(void)
g_hContactMenuItems[ICMI_XSTATUS_DETAILS] = Menu_AddContactMenuItem(&mi);
// "Open ICQ profile"
- strcpy(pszDest, MS_OPEN_PROFILE); CreateServiceFunction(str, IcqMenuHandleOpenProfile);
+ mir_strcpy(pszDest, MS_OPEN_PROFILE); CreateServiceFunction(str, IcqMenuHandleOpenProfile);
mi.pszName = LPGEN("Open ICQ profile");
mi.position = 1000029997;
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp
index ec5ff4f915..d579fcf081 100644
--- a/protocols/IcqOscarJ/src/icq_opts.cpp
+++ b/protocols/IcqOscarJ/src/icq_opts.cpp
@@ -148,7 +148,7 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ppro->setDword(UNIQUEIDSETTING, GetDlgItemInt(hwndDlg, IDC_ICQNUM, NULL, FALSE));
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(ppro->m_szPassword));
if (mir_strlen(str)) {
- strcpy(ppro->m_szPassword, str);
+ mir_strcpy(ppro->m_szPassword, str);
ppro->m_bRememberPwd = true;
}
else ppro->m_bRememberPwd = ppro->getByte("RememberPass", 0);
diff --git a/protocols/IcqOscarJ/src/icq_popups.cpp b/protocols/IcqOscarJ/src/icq_popups.cpp
index ef73f29049..bebaa2a01f 100644
--- a/protocols/IcqOscarJ/src/icq_popups.cpp
+++ b/protocols/IcqOscarJ/src/icq_popups.cpp
@@ -207,7 +207,7 @@ int CIcqProto::ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *
POPUPDATAT ppd = { 0 };
LPCTSTR rsIcon;
char szPrefix[32], szSetting[32];
- strcpy(szPrefix, "Popups");
+ mir_strcpy(szPrefix, "Popups");
switch(bType) {
case LOG_NOTE:
@@ -262,15 +262,15 @@ int CIcqProto::ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *
ppd.colorBack = NULL;
}
else {
- strcpy(szSetting, szPrefix);
+ mir_strcpy(szSetting, szPrefix);
strcat(szSetting, "TextColor");
ppd.colorText = getDword(szSetting, ppd.colorText);
- strcpy(szSetting, szPrefix);
+ mir_strcpy(szSetting, szPrefix);
strcat(szSetting, "BackColor");
ppd.colorBack = getDword(szSetting, ppd.colorBack);
}
}
- strcpy(szSetting, szPrefix);
+ mir_strcpy(szSetting, szPrefix);
strcat(szSetting, "Timeout");
ppd.iSeconds = getDword(szSetting, ppd.iSeconds);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 66446c6324..a3c44e208a 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -343,7 +343,7 @@ MCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, MEVENT hDb
uin = atoi((char*)pbOffset);
else {
uin = 0;
- strcpy(uid, (char*)pbOffset);
+ mir_strcpy(uid, (char*)pbOffset);
}
}
pbOffset += mir_strlen(pbOffset) + 1; // Uin
@@ -880,15 +880,15 @@ int __cdecl CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
}
PBYTE pBlob = (PBYTE)_alloca(cbBlob), pCurBlob;
for (i = 0, pCurBlob = pBlob; i < pre->lParam; i++) {
- strcpy((char*)pCurBlob, (char*)isrList[i]->hdr.nick);
+ mir_strcpy((char*)pCurBlob, (char*)isrList[i]->hdr.nick);
pCurBlob += mir_strlen((char*)pCurBlob) + 1;
if (isrList[i]->uin) {
char szUin[UINMAXLEN];
_itoa(isrList[i]->uin, szUin, 10);
- strcpy((char*)pCurBlob, szUin);
+ mir_strcpy((char*)pCurBlob, szUin);
}
else // aim contact
- strcpy((char*)pCurBlob, (char*)isrList[i]->hdr.id);
+ mir_strcpy((char*)pCurBlob, (char*)isrList[i]->hdr.id);
pCurBlob += mir_strlen((char*)pCurBlob) + 1;
}
@@ -990,7 +990,7 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT
if (contacts[i].uin)
strUID(contacts[i].uin, szContactUid);
else
- strcpy(szContactUid, contacts[i].uid);
+ mir_strcpy(szContactUid, contacts[i].uid);
// prepare UID
size_t wLen = mir_strlen(szContactUid);
@@ -1087,13 +1087,13 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT
for (i = 0; i < nContacts; i++) {
if (contacts[i].uin) {
_itoa(contacts[i].uin, szContactUin, 10);
- strcpy(pBuffer, szContactUin);
+ mir_strcpy(pBuffer, szContactUin);
}
else
- strcpy(pBuffer, contacts[i].uid);
+ mir_strcpy(pBuffer, contacts[i].uid);
pBuffer += mir_strlen(pBuffer);
*pBuffer++ = -2;
- strcpy(pBuffer, contacts[i].szNick);
+ mir_strcpy(pBuffer, contacts[i].szNick);
pBuffer += mir_strlen(pBuffer);
*pBuffer++ = -2;
}
@@ -1400,9 +1400,9 @@ int __cdecl CIcqProto::SendUrl(MCONTACT hContact, int, const char* url)
size_t nDescLen = mir_strlen(szDesc);
size_t nBodyLen = nUrlLen + nDescLen + 2;
char *szBody = (char *)_alloca(nBodyLen);
- strcpy(szBody, szDesc);
+ mir_strcpy(szBody, szDesc);
szBody[nDescLen] = -2; // Separator
- strcpy(szBody + nDescLen + 1, url);
+ mir_strcpy(szBody + nDescLen + 1, url);
if (m_bDCMsgEnabled && IsDirectConnectionOpen(hContact, DIRECTCONN_STANDARD, 0)) {
int iRes = icq_SendDirectMessage(hContact, szBody, nBodyLen, pCookieData, NULL);
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index 4c13f1fd8c..cfa8c1dd7f 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -1551,7 +1551,7 @@ char* CIcqProto::getServListUniqueGroupName(const char *szGroupName, int bAlloce
null_strcut(szGroupNameBase, m_wServerListRecordNameMaxLength - mir_strlen(szUnique) - 1);
szNewGroupName = (char*)SAFE_MALLOC(mir_strlen(szUnique) + mir_strlen(szGroupNameBase) + 2);
if (szNewGroupName) {
- strcpy(szNewGroupName, szGroupNameBase);
+ mir_strcpy(szNewGroupName, szGroupNameBase);
strcat(szNewGroupName, "~");
strcat(szNewGroupName, szUnique);
}
@@ -1586,7 +1586,7 @@ int CIcqProto::servlistCreateGroup_gotParentGroup(const char *szGroup, WORD wGro
szSubGroup = (char*)SAFE_MALLOC(mir_strlen(szGroup) + mir_strlen(szSubGroupName) + 2);
if (szSubGroup) {
- strcpy(szSubGroup, szGroup);
+ mir_strcpy(szSubGroup, szGroup);
strcat(szSubGroup, "\\");
strcat(szSubGroup, szSubGroupName);
}
@@ -1619,7 +1619,7 @@ int CIcqProto::servlistCreateGroup_gotParentGroup(const char *szGroup, WORD wGro
for (i = 0; i < wSubGroupLevel; i++)
szSubGroupItem[i] = '>';
- strcpy(szSubGroupItem + wSubGroupLevel, szSubGroupName);
+ mir_strcpy(szSubGroupItem + wSubGroupLevel, szSubGroupName);
szSubGroupItem[mir_strlen(szSubGroupName) + wSubGroupLevel] = '\0';
SAFE_FREE((void**)&szSubGroupName);
// check and create unique group name (Miranda does allow more subgroups with the same name!)
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 558372b04d..7d2aa51625 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -994,7 +994,7 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
char *text = (char*)nameXStatus[status-1];
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, text, -1, pData->pwszName, MAX_PATH);
}
- else strcpy(pData->pszName, (char*)nameXStatus[status-1]);
+ else mir_strcpy(pData->pszName, (char*)nameXStatus[status-1]);
}
else { // moods does not support status title
if (!m_bXStatusEnabled) return 1;
@@ -1010,10 +1010,10 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
else {
DBVARIANT dbv;
if ( !getString(hContact, DBSETTING_XSTATUS_NAME, &dbv) && dbv.pszVal) {
- strcpy(pData->pszName, dbv.pszVal);
+ mir_strcpy(pData->pszName, dbv.pszVal);
db_free(&dbv);
}
- else strcpy(pData->pszName, "");
+ else mir_strcpy(pData->pszName, "");
}
}
}
@@ -1031,9 +1031,9 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
DBVARIANT dbv = {0};
if (!getString(hContact, CheckContactCapabilities(hContact, CAPF_STATUS_MOOD) ? DBSETTING_STATUS_NOTE : DBSETTING_XSTATUS_MSG, &dbv) && dbv.pszVal)
- strcpy(pData->pszMessage, dbv.pszVal);
+ mir_strcpy(pData->pszMessage, dbv.pszVal);
else
- strcpy(pData->pszMessage, "");
+ mir_strcpy(pData->pszMessage, "");
db_free(&dbv);
}
diff --git a/protocols/IcqOscarJ/src/icq_xtraz.cpp b/protocols/IcqOscarJ/src/icq_xtraz.cpp
index ebcb150adc..5cd3521eb2 100644
--- a/protocols/IcqOscarJ/src/icq_xtraz.cpp
+++ b/protocols/IcqOscarJ/src/icq_xtraz.cpp
@@ -317,11 +317,11 @@ void CIcqProto::handleXtrazData(DWORD dwUin, char* szMsg, BOOL bThruDC)
szNum = szUrl + 5;
szWork = strstrnull(szUrl, ".html");
if (szWork) {
- strcpy(szWork, ".php");
+ mir_strcpy(szWork, ".php");
strcat(szWork, szWork + 5);
}
while (szWork = strstrnull(szUrl, "&amp;")) // unescape &amp; code
- strcpy(szWork + 1, szWork + 5);
+ mir_strcpy(szWork + 1, szWork + 5);
szWork = (char*)SAFE_MALLOC(nDataLen + MAX_PATH);
ICQTranslateUtfStatic(LPGEN("Greeting card:"), szWork, MAX_PATH);
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index 4e79e71618..e85460fefb 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -107,7 +107,7 @@ INT_PTR CIcqProto::GetInfoSetting(WPARAM hContact, LPARAM lParam)
}
}
else {
- char *savePtr = dbv.pszVal ? strcpy((char*)_alloca(mir_strlen(dbv.pszVal) + 1), dbv.pszVal) : NULL;
+ char *savePtr = dbv.pszVal ? mir_strcpy((char*)_alloca(mir_strlen(dbv.pszVal) + 1), dbv.pszVal) : NULL;
if (!mir_utf8decode(savePtr, &cgs->pValue->pwszVal))
rc = 1;
}
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index ddcb9efda3..339507ba2e 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -62,7 +62,7 @@ char* FindFilePathContainer(const char **files, int iFile, char *szContainer)
if (((pszLastBackslash = strrchr(files[i], '\\')) == NULL) &&
((pszLastBackslash = strrchr(files[i], '/')) == NULL)) {
- strcpy(szContainer, files[i]);
+ mir_strcpy(szContainer, files[i]);
}
else {
len = pszLastBackslash - files[i] + 1;
@@ -464,7 +464,7 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, size_t wLen, DWORD dwUin, char *
if (ft->wFilesCount == 1) { // Filename - use for DB event
char *szFileName = (char*)_alloca(mir_strlen(pszFileName) + 1);
- strcpy(szFileName, pszFileName);
+ mir_strcpy(szFileName, pszFileName);
SAFE_FREE(&pszFileName);
pszFileName = szFileName;
}
@@ -496,8 +496,8 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, size_t wLen, DWORD dwUin, char *
// Send chain event
char *szBlob = (char*)_alloca(sizeof(DWORD) + mir_strlen(pszFileName) + mir_strlen(pszDescription) + 2);
*(PDWORD)szBlob = 0;
- strcpy(szBlob + sizeof(DWORD), pszFileName);
- strcpy(szBlob + sizeof(DWORD) + mir_strlen(pszFileName) + 1, pszDescription);
+ mir_strcpy(szBlob + sizeof(DWORD), pszFileName);
+ mir_strcpy(szBlob + sizeof(DWORD) + mir_strlen(pszFileName) + 1, pszDescription);
PROTORECVFILET pre = { 0 };
pre.fileCount = 1;
@@ -787,7 +787,7 @@ HANDLE CIcqProto::oftInitTransfer(MCONTACT hContact, DWORD dwUin, char* szUid, c
ft->wCompress = 0;
ft->wPartsCount = 1;
ft->wPartsLeft = 1;
- strcpy(ft->rawIDString, "Cool FileXfer");
+ mir_strcpy(ft->rawIDString, "Cool FileXfer");
ft->bHeaderFlags = 0x20;
ft->bNameOff = 0x1C;
ft->bSizeOff = 0x11;
@@ -1747,7 +1747,7 @@ 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);
- strcpy(szFullPath, ft->szSavePath);
+ mir_strcpy(szFullPath, ft->szSavePath);
NormalizeBackslash(szFullPath);
strcat(szFullPath, ft->szThisPath);
NormalizeBackslash(szFullPath);
@@ -2032,7 +2032,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc)
char* szThisContainer = ft->files[ft->iCurrentFile].szContainer;
char *pszThisFileName = (char*)SAFE_MALLOC(mir_strlen(ft->szThisFile) + mir_strlen(szThisContainer) + 4);
- strcpy(pszThisFileName, szThisContainer);
+ mir_strcpy(pszThisFileName, szThisContainer);
NormalizeBackslash(pszThisFileName);
strcat(pszThisFileName, ExtractFileName(ft->szThisFile));
@@ -2069,7 +2069,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc)
if (ft->cbRawFileName < 64)
ft->cbRawFileName = 64;
ft->rawFileName = (char*)SAFE_MALLOC(ft->cbRawFileName);
- strcpy(ft->rawFileName, (char*)pszThisFileName);
+ mir_strcpy(ft->rawFileName, (char*)pszThisFileName);
SAFE_FREE((void**)&pszThisFileName);
}
else {
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp
index 0e2c2554c6..54b76ff356 100644
--- a/protocols/IcqOscarJ/src/stdpackets.cpp
+++ b/protocols/IcqOscarJ/src/stdpackets.cpp
@@ -989,7 +989,7 @@ void CIcqProto::icq_sendAwayMsgReplyServExt(DWORD dwUin, char *szUID, DWORD dwMs
// convert to HTML
char *mng = MangleXml(pszMsg, mir_strlen(pszMsg));
pszMsg = (char*)SAFE_MALLOC(mir_strlen(mng) + 28);
- strcpy(pszMsg, "<HTML><BODY>"); /// TODO: add support for RTL & user customizable font
+ mir_strcpy(pszMsg, "<HTML><BODY>"); /// TODO: add support for RTL & user customizable font
strcat(pszMsg, mng);
SAFE_FREE(&mng);
strcat(pszMsg, "</BODY></HTML>");
diff --git a/protocols/IcqOscarJ/src/upload.cpp b/protocols/IcqOscarJ/src/upload.cpp
index 46bccc228b..f627009847 100644
--- a/protocols/IcqOscarJ/src/upload.cpp
+++ b/protocols/IcqOscarJ/src/upload.cpp
@@ -69,9 +69,9 @@ int ChangeInfoData::UploadSettings(void)
if (tmp) {
if (mir_strlen(Password) > 0 && mir_strcmp(Password, tmp)) {
// update password in user info dialog (still open)
- strcpy(Password, tmp);
+ mir_strcpy(Password, tmp);
// update password in protocol
- strcpy(ppro->m_szPassword, tmp);
+ mir_strcpy(ppro->m_szPassword, tmp);
hUpload[1] = (HANDLE)ppro->icq_changeUserPasswordServ(tmp);
char szPwd[PASSWORDMAXLEN] = {0};
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index a3c5d56c2a..d68dbeba91 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -163,7 +163,7 @@ static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, MCONTACT hContac
default:
pstr = str;
- strcpy(str, "???");
+ mir_strcpy(str, "???");
break;
}
}