summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r--protocols/Tlen/src/tlen.cpp16
-rw-r--r--protocols/Tlen/src/tlen_avatar.cpp8
-rw-r--r--protocols/Tlen/src/tlen_file.cpp4
-rw-r--r--protocols/Tlen/src/tlen_iqid.cpp2
-rw-r--r--protocols/Tlen/src/tlen_misc.cpp4
-rw-r--r--protocols/Tlen/src/tlen_muc.cpp4
-rw-r--r--protocols/Tlen/src/tlen_p2p_old.cpp10
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp6
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp4
-rw-r--r--protocols/Tlen/src/tlen_util.cpp2
10 files changed, 30 insertions, 30 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index f824620131..e87fcac01d 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -269,7 +269,7 @@ void TlenProtocol::initMenuItems()
mi.pszContactOwner = m_szModuleName;
mi.popupPosition = 500090000;
- strcpy(text, m_szModuleName);
+ mir_strcpy(text, m_szModuleName);
mi.pszService = text;
mi.ptszName = m_tszUserName;
mi.position = -1999901009;
@@ -285,7 +285,7 @@ void TlenProtocol::initMenuItems()
hMenuChats = NULL;
// "Multi-User Conference"
- strcpy(pSvcName, "/MainMenuMUC");
+ mir_strcpy(pSvcName, "/MainMenuMUC");
CreateProtoService(pSvcName, &TlenProtocol::MUCMenuHandleMUC);
mi.pszName = LPGEN("Multi-User Conference");
mi.position = 2000050002;
@@ -294,7 +294,7 @@ void TlenProtocol::initMenuItems()
hMenuMUC = Menu_AddMainMenuItem(&mi);
Menu_ModifyItem(hMenuMUC, &clmi);
- strcpy(pSvcName, "/MainMenuInbox");
+ mir_strcpy(pSvcName, "/MainMenuInbox");
CreateProtoService(pSvcName, &TlenProtocol::MenuHandleInbox);
mi.pszName = LPGEN("Tlen Mail");
mi.position = 2000050003;
@@ -305,7 +305,7 @@ void TlenProtocol::initMenuItems()
mi.hParentMenu = NULL;
// "Send picture"
- strcpy(pSvcName, "/SendPicture");
+ mir_strcpy(pSvcName, "/SendPicture");
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleSendPicture);
mi.pszName = LPGEN("Send picture");
mi.position = -2000019030;
@@ -313,7 +313,7 @@ void TlenProtocol::initMenuItems()
hMenuPicture = Menu_AddContactMenuItem(&mi);
// "Invite to MUC"
- strcpy(pSvcName, "/ContactMenuMUC");
+ mir_strcpy(pSvcName, "/ContactMenuMUC");
CreateProtoService(pSvcName, &TlenProtocol::MUCContactMenuHandleMUC);
mi.pszName = LPGEN("Multi-User Conference");
mi.position = -2000019020;
@@ -321,7 +321,7 @@ void TlenProtocol::initMenuItems()
hMenuContactMUC = Menu_AddContactMenuItem(&mi);
// "Invite to voice chat"
- strcpy(pSvcName, "/ContactMenuVoice");
+ mir_strcpy(pSvcName, "/ContactMenuVoice");
CreateProtoService(pSvcName, &TlenProtocol::VoiceContactMenuHandleVoice);
mi.pszName = LPGEN("Voice Chat");
mi.position = -2000019010;
@@ -329,7 +329,7 @@ void TlenProtocol::initMenuItems()
hMenuContactVoice = Menu_AddContactMenuItem(&mi);
// "Request authorization"
- strcpy(pSvcName, "/RequestAuth");
+ mir_strcpy(pSvcName, "/RequestAuth");
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleRequestAuth);
mi.pszName = LPGEN("Request authorization");
mi.position = -2000001001;
@@ -337,7 +337,7 @@ void TlenProtocol::initMenuItems()
hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi);
// "Grant authorization"
- strcpy(pSvcName, "/GrantAuth");
+ mir_strcpy(pSvcName, "/GrantAuth");
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleGrantAuth);
mi.pszName = LPGEN("Grant authorization");
mi.position = -2000001000;
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp
index 2137bf8c58..e0722447a9 100644
--- a/protocols/Tlen/src/tlen_avatar.cpp
+++ b/protocols/Tlen/src/tlen_avatar.cpp
@@ -98,7 +98,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it
mir_free(hash);
} else {
proto->threadData->avatarFormat = format;
- strcpy(proto->threadData->avatarHash, md5);
+ mir_strcpy(proto->threadData->avatarHash, md5);
}
TlenGetAvatarFileName(proto, item, filename, SIZEOF(filename)-1);
DeleteFile(filename);
@@ -194,18 +194,18 @@ static char *replaceTokens(const char *base, const char *uri, const char *login,
}
}
result = (char *)mir_alloc(size +1);
- strcpy(result, base);
+ mir_strcpy(result, base);
size = (int)mir_strlen(base);
for (i = 0; i < l; ) {
if (!strncmp(uri + i, "^login^", 7)) {
- strcpy(result + size, login);
+ mir_strcpy(result + size, login);
size += (int)mir_strlen(login);
i += 7;
} else if (!strncmp(uri + i, "^type^", 6)) {
result[size++] = '0' + type;
i += 6;
} else if (!strncmp(uri + i, "^token^", 7)) {
- strcpy(result + size, token);
+ mir_strcpy(result + size, token);
size += (int)mir_strlen(token);
i += 7;
} else if (!strncmp(uri + i, "^access^", 8)) {
diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp
index 105f3785f1..aaa8aa8ccd 100644
--- a/protocols/Tlen/src/tlen_file.cpp
+++ b/protocols/Tlen/src/tlen_file.cpp
@@ -80,7 +80,7 @@ static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft)
TlenP2PPacketFree(packet);
fullFileName = (char *) mir_alloc(mir_strlen(ft->szSavePath) + mir_strlen(ft->files[ft->currentFile]) + 2);
- strcpy(fullFileName, ft->szSavePath);
+ mir_strcpy(fullFileName, ft->szSavePath);
if (fullFileName[mir_strlen(fullFileName)-1] != '\\')
strcat(fullFileName, "\\");
strcat(fullFileName, ft->files[ft->currentFile]);
@@ -581,7 +581,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info)
strncpy(szFilename, p, sizeof(szFilename)-1);
mir_free(p);
} else {
- strcpy(szFilename, Translate("1 File"));
+ mir_strcpy(szFilename, Translate("1 File"));
}
}
else if (numFiles > 1) {
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp
index e0b831b98e..95f9e4d745 100644
--- a/protocols/Tlen/src/tlen_iqid.cpp
+++ b/protocols/Tlen/src/tlen_iqid.cpp
@@ -505,7 +505,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode)
void GetConfigItem(XmlNode *node, char *dest, BOOL bMethod, int *methodDest) {
- strcpy(dest, node->text);
+ mir_strcpy(dest, node->text);
TlenUrlDecode(dest);
if (bMethod) {
char *method = TlenXmlGetAttrValue(node, "method");
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp
index f55d025959..fd868ecc5a 100644
--- a/protocols/Tlen/src/tlen_misc.cpp
+++ b/protocols/Tlen/src/tlen_misc.cpp
@@ -64,10 +64,10 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick)
pBlob = pCurBlob = (PBYTE) mir_alloc(cbBlob);
*((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD);
*((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD);
- strcpy((char *) pCurBlob, nick); pCurBlob += mir_strlen(nick)+1;
+ mir_strcpy((char *) pCurBlob, nick); pCurBlob += mir_strlen(nick)+1;
*pCurBlob = '\0'; pCurBlob++; //firstName
*pCurBlob = '\0'; pCurBlob++; //lastName
- strcpy((char *) pCurBlob, jid); pCurBlob += mir_strlen(jid)+1;
+ mir_strcpy((char *) pCurBlob, jid); pCurBlob += mir_strlen(jid)+1;
*pCurBlob = '\0'; //reason
TlenDBAddEvent(proto, NULL, EVENTTYPE_AUTHREQUEST, 0, pBlob, cbBlob);
}
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp
index 07b59d5f47..f440c97f57 100644
--- a/protocols/Tlen/src/tlen_muc.cpp
+++ b/protocols/Tlen/src/tlen_muc.cpp
@@ -110,7 +110,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r
mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, dbv.pszVal);
db_free(&dbv);
} else {
- strcpy(jid, from);
+ mir_strcpy(jid, from);
}
ignore = !IsAuthorized(proto, jid);
ask = TRUE;
@@ -122,7 +122,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r
mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, dbv.pszVal);
db_free(&dbv);
} else {
- strcpy(jid, from);
+ mir_strcpy(jid, from);
}
item = TlenListGetItemPtr(proto, LIST_ROSTER, jid);
ask = !IsAuthorized(proto, jid);
diff --git a/protocols/Tlen/src/tlen_p2p_old.cpp b/protocols/Tlen/src/tlen_p2p_old.cpp
index 64edd27d0e..cb72d33849 100644
--- a/protocols/Tlen/src/tlen_p2p_old.cpp
+++ b/protocols/Tlen/src/tlen_p2p_old.cpp
@@ -308,7 +308,7 @@ static HANDLE TlenP2PBindSocks4(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft)
*(PWORD)(buf+2) = htons(0); // port
*(PDWORD)(buf+4) = INADDR_ANY;
if (sb->useAuth) {
- strcpy((char*)buf+8, sb->szUser);
+ mir_strcpy((char*)buf+8, sb->szUser);
len = (int)mir_strlen(sb->szUser);
} else {
buf[8] = 0;
@@ -428,7 +428,7 @@ static HANDLE TlenP2PBindSocks5(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft)
len += 4;
} else { // ip address
in.S_un.S_addr = *(PDWORD)(buf+4);
- strcpy(sb->szHost, inet_ntoa(in));
+ mir_strcpy(sb->szHost, inet_ntoa(in));
len = 8;
}
sb->wPort = htons(*(PWORD)(buf+len));
@@ -454,12 +454,12 @@ HANDLE TlenP2PListen(TLEN_FILE_TRANSFER *ft)
ft->wPort = 0;
if (db_get_b(NULL, proto->m_szModuleName, "UseFileProxy", FALSE)) {
if (!db_get(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) {
- strcpy(sb.szHost, dbv.pszVal);
+ mir_strcpy(sb.szHost, dbv.pszVal);
db_free(&dbv);
sb.wPort = db_get_w(NULL, proto->m_szModuleName, "FileProxyPort", 0);
sb.useAuth = FALSE;
- strcpy(sb.szUser, "");
- strcpy(sb.szPassword, "");
+ mir_strcpy(sb.szUser, "");
+ mir_strcpy(sb.szPassword, "");
if (db_get_b(NULL, proto->m_szModuleName, "FileProxyAuth", FALSE)) {
sb.useAuth = TRUE;
if (!db_get_s(NULL, proto->m_szModuleName, "FileProxyUsername", &dbv)) {
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 5572212bbb..705b4ca150 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -626,11 +626,11 @@ int TlenProtocol::SendMsg(MCONTACT hContact, int, const char* msgRAW)
char *msgEnc = TlenTextEncode(msgRAW);
if (msgEnc != NULL) {
if (TlenListExist(this, LIST_CHATROOM, dbv.pszVal) && strchr(dbv.pszVal, '/') == NULL)
- strcpy(msgType, "groupchat");
+ mir_strcpy(msgType, "groupchat");
else if (db_get_b(hContact, m_szModuleName, "bChat", FALSE))
- strcpy(msgType, "privchat");
+ mir_strcpy(msgType, "privchat");
else
- strcpy(msgType, "chat");
+ mir_strcpy(msgType, "chat");
if (!mir_strcmp(msgType, "groupchat") || db_get_b(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
if (!mir_strcmp(msgType, "groupchat"))
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 4984a7f6a5..3c31a9a097 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -563,7 +563,7 @@ static void TlenProcessIqGetVersion(TlenProtocol *proto, XmlNode *node)
if ( os == NULL ) os = TlenTextEncode("Windows");
- strcpy(mversion, "Miranda NG ");
+ mir_strcpy(mversion, "Miranda NG ");
CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof( mversion ) - 11, ( LPARAM )mversion + 11 );
strcat(mversion, " (Tlen v.");
strcat(mversion, TLEN_VERSION_STRING);
@@ -1131,7 +1131,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info)
if (iNode != NULL) {
iStr = TlenXmlGetAttrValue(iNode, "i");
temp = (char*)mir_alloc(mir_strlen(f)+mir_strlen(iStr)+2);
- strcpy(temp, f);
+ mir_strcpy(temp, f);
strcat(temp, "/");
strcat(temp, iStr);
f = TlenTextDecode(temp);
diff --git a/protocols/Tlen/src/tlen_util.cpp b/protocols/Tlen/src/tlen_util.cpp
index 55420658cd..f315a3e177 100644
--- a/protocols/Tlen/src/tlen_util.cpp
+++ b/protocols/Tlen/src/tlen_util.cpp
@@ -435,7 +435,7 @@ void TlenLogMessage(TlenProtocol *proto, MCONTACT hContact, DWORD flags, const c
{
int size = (int)mir_strlen(message) + 2;
char *localMessage = (char *)mir_alloc(size);
- strcpy(localMessage, message);
+ mir_strcpy(localMessage, message);
localMessage[size - 1] = '\0';
TlenDBAddEvent(proto, hContact, EVENTTYPE_MESSAGE, flags, (PBYTE)message, (DWORD)size);
mir_free(localMessage);