summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/conv.cpp88
-rw-r--r--protocols/AimOscar/src/server.cpp64
-rw-r--r--protocols/EmLanProto/src/mlan.cpp4
-rw-r--r--protocols/FacebookRM/src/process.cpp6
-rw-r--r--protocols/FacebookRM/src/proto.cpp6
-rw-r--r--protocols/FacebookRM/src/theme.cpp14
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp16
-rw-r--r--protocols/Gadu-Gadu/src/token.cpp4
-rw-r--r--protocols/ICQCorp/src/corp.cpp2
-rw-r--r--protocols/ICQCorp/src/protocol.cpp8
-rw-r--r--protocols/ICQCorp/src/services.cpp6
-rw-r--r--protocols/ICQCorp/src/transfer.cpp2
-rw-r--r--protocols/IRCG/src/services.cpp18
-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
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp32
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp4
-rw-r--r--protocols/MRA/src/Mra_menus.cpp2
-rw-r--r--protocols/MSN/src/msn_auth.cpp10
-rw-r--r--protocols/MSN/src/msn_commands.cpp14
-rw-r--r--protocols/MSN/src/msn_ftold.cpp2
-rw-r--r--protocols/MSN/src/msn_libstr.cpp22
-rw-r--r--protocols/MSN/src/msn_menu.cpp22
-rw-r--r--protocols/MSN/src/msn_mime.cpp4
-rw-r--r--protocols/MSN/src/msn_misc.cpp16
-rw-r--r--protocols/MSN/src/msn_opts.cpp10
-rw-r--r--protocols/MSN/src/msn_p2p.cpp2
-rw-r--r--protocols/MSN/src/msn_soapstore.cpp2
-rw-r--r--protocols/MSN/src/msn_threads.cpp18
-rw-r--r--protocols/Sametime/src/files.cpp4
-rw-r--r--protocols/Sametime/src/options.cpp6
-rw-r--r--protocols/Sametime/src/sametime_session.cpp2
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp4
-rw-r--r--protocols/SkypeClassic/src/skype.cpp10
-rw-r--r--protocols/SkypeClassic/src/skypeapi.cpp8
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp6
-rw-r--r--protocols/Steam/src/steam_contacts.cpp10
-rw-r--r--protocols/Steam/src/steam_menus.cpp2
-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
-rw-r--r--protocols/Twitter/src/proto.cpp4
-rw-r--r--protocols/VKontakte/src/misc.cpp6
-rw-r--r--protocols/WhatsApp/src/theme.cpp4
-rw-r--r--protocols/Xfire/src/SHA1.cpp2
-rw-r--r--protocols/Xfire/src/SHA1.h2
-rw-r--r--protocols/Xfire/src/Xfire_base.cpp4
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp2
-rw-r--r--protocols/Xfire/src/addgamedialog.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp50
-rw-r--r--protocols/Xfire/src/options.cpp8
-rw-r--r--protocols/Xfire/src/passworddialog.cpp4
-rw-r--r--protocols/Xfire/src/processbuddyinfo.cpp2
-rw-r--r--protocols/Xfire/src/searching4games.cpp20
-rw-r--r--protocols/Xfire/src/tools.cpp6
-rw-r--r--protocols/Xfire/src/userdetails.cpp2
85 files changed, 410 insertions, 410 deletions
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp
index 75c95e2cc7..c63010341b 100644
--- a/protocols/AimOscar/src/conv.cpp
+++ b/protocols/AimOscar/src/conv.cpp
@@ -99,7 +99,7 @@ void html_decode(char* str)
char *t1 = mir_utf8encodeW(t);
if (t1 && *t1)
{
- strcpy(q, t1);
+ mir_strcpy(q, t1);
q += mir_strlen(t1) - 1;
}
mir_free(t1);
@@ -112,30 +112,30 @@ void html_decode(char* str)
}
else if ( *p == '<' )
{
- if ( !strnicmp( p, "<p>", 3 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
- else if ( !strnicmp( p, "</p>", 4 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<br>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<br />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
- else if ( !strnicmp( p, "<hr>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<hr />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
+ if ( !strnicmp( p, "<p>", 3 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
+ else if ( !strnicmp( p, "</p>", 4 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<br>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<br />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
+ else if ( !strnicmp( p, "<hr>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<hr />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
/*
- else if ( !strnicmp( p, "<b>", 3 )) { strcpy(q, "[b]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</b>", 4 )) { strcpy(q, "[/b]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<u>", 3 )) { strcpy(q, "[u]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</u>", 4 )) { strcpy(q, "[/u]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<i>", 3 )) { strcpy(q, "[i]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</i>", 4 )) { strcpy(q, "[/i]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<s>", 3 )) { strcpy(q, "[s]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</s>", 4 )) { strcpy(q, "[/s]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<b>", 3 )) { mir_strcpy(q, "[b]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</b>", 4 )) { mir_strcpy(q, "[/b]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<u>", 3 )) { mir_strcpy(q, "[u]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</u>", 4 )) { mir_strcpy(q, "[/u]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<i>", 3 )) { mir_strcpy(q, "[i]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</i>", 4 )) { mir_strcpy(q, "[/i]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<s>", 3 )) { mir_strcpy(q, "[s]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</s>", 4 )) { mir_strcpy(q, "[/s]"); q += 3; p += 3; }
else if ( !strnicmp( p, "<a href", 7 )) {
- strcpy(q, "[url"); q += 4; p += 7;
+ mir_strcpy(q, "[url"); q += 4; p += 7;
while (*p != '>' && *p) *(q++) = *(p++);
*q = ']'; --p;
}
else if ( !strnicmp( p, "<font", 5 )) {
char *l = strchr(p, '>');
- strcpy(q, "[url"); q += 4; p += 7;
+ mir_strcpy(q, "[url"); q += 4; p += 7;
while (*p != '>' && *p) *(q++) = *(p++);
*q = ']'; --p;
}
@@ -175,7 +175,7 @@ char* html_encode(const char* str)
}
s = (char*)mir_alloc(c + 27);
- strcpy(s, "<HTML><BODY>");
+ mir_strcpy(s, "<HTML><BODY>");
for ( p=str,q=s+12; *p!='\0'; p++ )
{
switch ( *p )
@@ -190,7 +190,7 @@ char* html_encode(const char* str)
default: *q = *p; ++q; break;
}
}
- strcpy(q, "</BODY></HTML>");
+ mir_strcpy(q, "</BODY></HTML>");
return s;
}
@@ -657,14 +657,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
Bold=isBold;
if (isBold)
{
- strcpy(&buf[pos],"<b>");
+ mir_strcpy(&buf[pos],"<b>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</b>");
+ mir_strcpy(&buf[pos],"</b>");
pos+=4;
}
}
@@ -674,14 +674,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
Italic=isItalic;
if (isItalic)
{
- strcpy(&buf[pos],"<i>");
+ mir_strcpy(&buf[pos],"<i>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</i>");
+ mir_strcpy(&buf[pos],"</i>");
pos+=4;
}
}
@@ -691,14 +691,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
Underline=isUnderline;
if (isUnderline)
{
- strcpy(&buf[pos],"<u>");
+ mir_strcpy(&buf[pos],"<u>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</u>");
+ mir_strcpy(&buf[pos],"</u>");
pos+=4;
}
}
@@ -708,23 +708,23 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
Size=isSize;
Color=isColor;
BackColor=isBackColor;
- strcpy(Face,cfOld.szFaceName);
+ mir_strcpy(Face,cfOld.szFaceName);
if (start!=0)
{
- strcpy(&buf[pos],"</font>");
+ mir_strcpy(&buf[pos],"</font>");
pos+=7;
}
- strcpy(&buf[pos],"<font");
+ mir_strcpy(&buf[pos],"<font");
pos+=5;
- strcpy(&buf[pos]," face=\"");
+ mir_strcpy(&buf[pos]," face=\"");
pos+=7;
- strcpy(&buf[pos],Face);
+ mir_strcpy(&buf[pos],Face);
pos+=mir_strlen(Face);
- strcpy(&buf[pos],"\"");
+ mir_strcpy(&buf[pos],"\"");
pos++;
if (!(cfOld.dwEffects & CFE_AUTOBACKCOLOR))
{
- strcpy(&buf[pos]," back=#");
+ mir_strcpy(&buf[pos]," back=#");
pos+=6;
char chBackColor[7];
_itoa((_htonl(BackColor)>>8),chBackColor,16);
@@ -735,12 +735,12 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
for(int i=0;i<6;i++)
chBackColor[i]='0';
}
- strcpy(&buf[pos],chBackColor);
+ mir_strcpy(&buf[pos],chBackColor);
pos+=6;
}
if (!(cfOld.dwEffects & CFE_AUTOCOLOR))
{
- strcpy(&buf[pos]," color=#");
+ mir_strcpy(&buf[pos]," color=#");
pos+=8;
char chColor[7];
_itoa((_htonl(Color)>>8),chColor,16);
@@ -751,28 +751,28 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
for(int i=0;i<6;i++)
chColor[i]='0';
}
- strcpy(&buf[pos],chColor);
+ mir_strcpy(&buf[pos],chColor);
pos+=6;
}
- strcpy(&buf[pos]," size=");
+ mir_strcpy(&buf[pos]," size=");
pos+=6;
char chSize[2];
_itoa(Size,chSize,10);
- strcpy(&buf[pos],chSize);
+ mir_strcpy(&buf[pos],chSize);
pos++;
- strcpy(&buf[pos],">");
+ mir_strcpy(&buf[pos],">");
pos++;
}
if (text[0]=='\r')
{
- strcpy(&buf[pos],"<br>");
+ mir_strcpy(&buf[pos],"<br>");
pos+=4;
}
else
{
T2Utf txt(text);
- strcpy(&buf[pos], txt);
+ mir_strcpy(&buf[pos], txt);
pos += mir_strlen(txt);
}
start++;
@@ -780,20 +780,20 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem)
}
if (Bold)
{
- strcpy(&buf[pos],"</b>");
+ mir_strcpy(&buf[pos],"</b>");
pos+=4;
}
if (Italic)
{
- strcpy(&buf[pos],"</i>");
+ mir_strcpy(&buf[pos],"</i>");
pos+=4;
}
if (Underline)
{
- strcpy(&buf[pos],"</u>");
+ mir_strcpy(&buf[pos],"</u>");
pos+=4;
}
- strcpy(&buf[pos],"</font>");
+ mir_strcpy(&buf[pos],"</font>");
pos+=7;
SendDlgItemMessage(hwndDlg, DlgItem, EM_SETSEL, oldstart, oldend);
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index a48b25df92..2548838fa8 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -280,12 +280,12 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
if (bot)
{
- strcpy(client,CLIENT_BOT);
+ mir_strcpy(client,CLIENT_BOT);
bot_user=1;
}
if (wireless)
{
- strcpy(client,CLIENT_SMS);
+ mir_strcpy(client,CLIENT_SMS);
wireless_user=1;
}
else if (away)
@@ -356,31 +356,31 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
}
else if (memcmp(cap, "Kopete ICQ", 10) == 0)
{
- strcpy(client,CLIENT_KOPETE);
+ mir_strcpy(client,CLIENT_KOPETE);
}
else if (memcmp(&cap[7], "QIP", 3) == 0)
{
- strcpy(client,CLIENT_QIP);
+ mir_strcpy(client,CLIENT_QIP);
}
else if (memcmp(cap, "mICQ", 4) == 0)
{
- strcpy(client,CLIENT_MICQ);
+ mir_strcpy(client,CLIENT_MICQ);
}
else if (cap_cmp(cap, AIM_CAP_IM2) == 0)
{
- strcpy(client,CLIENT_IM2);
+ mir_strcpy(client,CLIENT_IM2);
}
else if (memcmp(cap, "SIM client", 10) == 0)
{
- strcpy(client,CLIENT_SIM);
+ mir_strcpy(client,CLIENT_SIM);
}
else if (memcmp(cap+4, "naim", 4) == 0)
{
- strcpy(client,CLIENT_NAIM);
+ mir_strcpy(client,CLIENT_NAIM);
}
else if (memcmp(cap, "digsby", 6) == 0)
{
- strcpy(client,CLIENT_DIGSBY);
+ mir_strcpy(client,CLIENT_DIGSBY);
}
mir_free(cap);
}
@@ -432,7 +432,7 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
O1ff=1;
if (cap==0x1323)
{
- strcpy(client,CLIENT_GPRS);
+ mir_strcpy(client,CLIENT_GPRS);
hiptop_user=1;
}
if (cap==0x1341)
@@ -455,52 +455,52 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
l34e=1;
}
if (f002&&f003&&f004&&f005)
- strcpy(client,CLIENT_TRILLIAN_PRO);
+ mir_strcpy(client,CLIENT_TRILLIAN_PRO);
else if ((f004&&f005&&f007&&f008) || (f004&&f005&&O104&&O105))
- strcpy(client,CLIENT_ICHAT);
+ mir_strcpy(client,CLIENT_ICHAT);
else if (f003&f004&f005)
- strcpy(client,CLIENT_TRILLIAN);
+ mir_strcpy(client,CLIENT_TRILLIAN);
else if (l343&&O1ff&&tlv.len()==4)
- strcpy(client,CLIENT_TRILLIAN_ASTRA);
+ mir_strcpy(client,CLIENT_TRILLIAN_ASTRA);
else if (l343&&tlv.len()==2)
- strcpy(client,CLIENT_AIMTOC);
+ mir_strcpy(client,CLIENT_AIMTOC);
else if (l343&&l345&&l346&&tlv.len()==6)
- strcpy(client,CLIENT_GAIM);
+ mir_strcpy(client,CLIENT_GAIM);
else if (l343&&l345&&l346&&l34e&&tlv.len()==8)
- strcpy(client,CLIENT_PURPLE);
+ mir_strcpy(client,CLIENT_PURPLE);
else if (l343&&l345&&l346&&l349&&l34e&&tlv.len()==10)
- strcpy(client,CLIENT_PURPLE);
+ mir_strcpy(client,CLIENT_PURPLE);
else if (l343&&l345&&l34e&&tlv.len()==6)
- strcpy(client,CLIENT_ADIUM);
+ mir_strcpy(client,CLIENT_ADIUM);
else if (l343&&l346&&l34e&&tlv.len()==6)
- strcpy(client,CLIENT_TERRAIM);
+ mir_strcpy(client,CLIENT_TERRAIM);
else if (tlv.len()==0 && getWord(hContact, AIM_KEY_ST,0)!=ID_STATUS_ONTHEPHONE)
- strcpy(client,CLIENT_AIMEXPRESS5);
+ mir_strcpy(client,CLIENT_AIMEXPRESS5);
else if (l34b&&l343&&O1ff&&l345&&l346&&tlv.len()==10)
- strcpy(client,CLIENT_AIMEXPRESS6);
+ mir_strcpy(client,CLIENT_AIMEXPRESS6);
else if (l34b&&l341&&l343&&O1ff&&l345&&l346&&l347)
- strcpy(client,CLIENT_AIM5);
+ mir_strcpy(client,CLIENT_AIM5);
else if (l34b&&l341&&l343&&l345&l346&&l347&&l348)
- strcpy(client,CLIENT_AIM4);
+ mir_strcpy(client,CLIENT_AIM4);
else if (O1ff&&l343&&O107&&l341&&O104&&O105&&O101&&l346)
{
if (O10d)
- strcpy(client,CLIENT_AIM6_9);
+ mir_strcpy(client,CLIENT_AIM6_9);
else if (O10c)
- strcpy(client,CLIENT_AIM6_8);
+ mir_strcpy(client,CLIENT_AIM6_8);
else if (O10a)
- strcpy(client,CLIENT_AIM6_5);
+ mir_strcpy(client,CLIENT_AIM6_5);
else
- strcpy(client,CLIENT_AIM_TRITON);
+ mir_strcpy(client,CLIENT_AIM_TRITON);
}
else if (O1ff&&l343&&l341&&O104&&O105&&O101&&l346)
- strcpy(client,CLIENT_AIM7_0);
+ mir_strcpy(client,CLIENT_AIM7_0);
else if (l346&&l34e&&tlv.len()==4)
- strcpy(client,CLIENT_MEEBO);
+ mir_strcpy(client,CLIENT_MEEBO);
else if (l34e&&tlv.len()==2)
- strcpy(client,CLIENT_BEEJIVE);
+ mir_strcpy(client,CLIENT_BEEJIVE);
else if (l34e&&l343&&tlv.len()==4)
- strcpy(client,CLIENT_BEEJIVE);
+ mir_strcpy(client,CLIENT_BEEJIVE);
// setByte(hContact, AIM_KEY_US, utf8);
}
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index c66d128c05..e0cfd7962c 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -1394,12 +1394,12 @@ void CMLan::OnOutTCPConnection(u_long addr, SOCKET out_socket, LPVOID lpParamete
GetFullPathName(*pf, MAX_PATH, (char*)name, &filepart);
delete[] * pf;
*pf = _strdup(name);
- strcpy((char*)buf + len, filepart);
+ mir_strcpy((char*)buf + len, filepart);
len += (int)mir_strlen(filepart) + 1;
pf++;
}
- strcpy((char*)buf + len, conn->m_szDescription);
+ mir_strcpy((char*)buf + len, conn->m_szDescription);
len += (int)mir_strlen(conn->m_szDescription) + 1;
*((int*)(buf + 1)) = size;
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index e89049cd70..fe9651aff0 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -980,11 +980,11 @@ void FacebookProto::ProcessFriendRequests(void*)
PBYTE pCurBlob = dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
*(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
*(PDWORD)pCurBlob = (DWORD)hContact; pCurBlob += sizeof(DWORD); // Contact Handle
- strcpy((char*)pCurBlob, fbu.real_name.data()); pCurBlob += fbu.real_name.length() + 1; // Nickname
+ mir_strcpy((char*)pCurBlob, fbu.real_name.data()); pCurBlob += fbu.real_name.length() + 1; // Nickname
*pCurBlob = '\0'; pCurBlob++; // First Name
*pCurBlob = '\0'; pCurBlob++; // Last Name
- strcpy((char*)pCurBlob, fbu.user_id.data()); pCurBlob += fbu.user_id.length() + 1; // E-mail (we use it for string ID)
- strcpy((char*)pCurBlob, reason.data()); pCurBlob += reason.length() + 1; // Reason (we use it for info about common friends)
+ mir_strcpy((char*)pCurBlob, fbu.user_id.data()); pCurBlob += fbu.user_id.length() + 1; // E-mail (we use it for string ID)
+ mir_strcpy((char*)pCurBlob, reason.data()); pCurBlob += reason.length() + 1; // Reason (we use it for info about common friends)
db_event_add(0, &dbei);
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 7018e530ea..6cee2f91a0 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -1064,15 +1064,15 @@ void FacebookProto::InitHotkeys()
hkd.ptszSection = m_tszUserName;
hkd.dwFlags = HKD_TCHAR;
- strcpy(tDest, "/VisitProfile");
+ mir_strcpy(tDest, "/VisitProfile");
hkd.ptszDescription = LPGENT("Visit profile");
Hotkey_Register(&hkd);
- strcpy(tDest, "/VisitNotifications");
+ mir_strcpy(tDest, "/VisitNotifications");
hkd.ptszDescription = LPGENT("Visit notifications");
Hotkey_Register(&hkd);
- strcpy(tDest, "/Mind");
+ mir_strcpy(tDest, "/Mind");
hkd.ptszDescription = LPGENT("Show 'Share status' window");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_EXT, 'F');
Hotkey_Register(&hkd);
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 50ff063a14..98a20f17ea 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -236,13 +236,13 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
mi.hParentMenu = hRoot;
//CreateProtoService(m_szModuleName,"/Mind",&FacebookProto::OnMind,this);
- strcpy(tDest, "/Mind");
+ mir_strcpy(tDest, "/Mind");
mi.pszName = LPGEN("Share status...");
mi.icolibItem = GetIconHandle("mind");
m_hStatusMind = Menu_AddProtoMenuItem(&mi);
//CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
- strcpy(tDest, "/VisitProfile");
+ mir_strcpy(tDest, "/VisitProfile");
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Visit profile");
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
@@ -250,20 +250,20 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
//CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
- strcpy(tDest, "/VisitNotifications");
+ mir_strcpy(tDest, "/VisitNotifications");
mi.pszName = LPGEN("Visit notifications");
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
Menu_AddProtoMenuItem(&mi);
// Services...
mi.pszName = LPGEN("Services...");
- strcpy(tDest, "/Services");
+ mir_strcpy(tDest, "/Services");
mi.flags = CMIF_CHILDPOPUP | (this->isOnline() ? 0 : CMIF_GRAYED);
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HELP);
m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/RefreshBuddyList", &FacebookProto::RefreshBuddyList);
- strcpy(tDest, "/RefreshBuddyList");
+ mir_strcpy(tDest, "/RefreshBuddyList");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Refresh Buddy List");
mi.pszPopupName = LPGEN("Services");
@@ -272,7 +272,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckFriendRequests", &FacebookProto::CheckFriendRequests);
- strcpy(tDest, "/CheckFriendRequests");
+ mir_strcpy(tDest, "/CheckFriendRequests");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Friends Requests");
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
@@ -280,7 +280,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckNewsfeeds", &FacebookProto::CheckNewsfeeds);
- strcpy(tDest, "/CheckNewsfeeds");
+ mir_strcpy(tDest, "/CheckNewsfeeds");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Newsfeeds");
mi.pszPopupName = LPGEN("Services");
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index a0dbc4101c..37a106802a 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -152,7 +152,7 @@ void GGPROTO::requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL)
if (avatar_transfers.getIndex((GGGETAVATARDATA*)&hContact) == -1) {
GGGETAVATARDATA *data = (GGGETAVATARDATA*)mir_alloc(sizeof(GGGETAVATARDATA) + mir_strlen(szAvatarURL)+1);
data->hContact = hContact;
- data->szAvatarURL = strcpy((char*)(data+1), szAvatarURL);
+ data->szAvatarURL = mir_strcpy((char*)(data+1), szAvatarURL);
avatar_transfers.insert(data);
}
gg_LeaveCriticalSection(&avatar_mutex, "requestAvatarTransfer", 1, 1, "avatar_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index 5ace2600c9..1c57a0b590 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -190,7 +190,7 @@ void GGPROTO::checknewuser(uin_t uin, const char* passwd)
oldpasswd[0] = '\0';
if (!getString(GG_KEY_PASSWORD, &dbv))
{
- if (dbv.pszVal) strcpy(oldpasswd, dbv.pszVal);
+ if (dbv.pszVal) mir_strcpy(oldpasswd, dbv.pszVal);
db_free(&dbv);
}
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index 9a7a880e50..95e9446ca6 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -175,7 +175,7 @@ void GGPROTO::parsecontacts(char *contacts)
{
strPhone = (char*)malloc((n - p) + 5);
strncpy(strPhone, p, (n - p));
- strcpy((strPhone + (n - p)), " SMS"); // Add SMS postfix
+ mir_strcpy((strPhone + (n - p)), " SMS"); // Add SMS postfix
}
p = (n + 1);
}
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 4f394aae89..378d20f78e 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -112,7 +112,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> &params, const char *httpmet
}
res = (char *)mir_alloc(size);
- strcpy(res, httpmethod);
+ mir_strcpy(res, httpmethod);
strcat(res, "&");
strcat(res, urlenc);
mir_free(urlenc);
@@ -195,7 +195,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> &params, const char *httpmethod, con
ptrA csenc( oauth_uri_escape(consumer_secret));
ptrA tsenc( oauth_uri_escape(token_secret));
ptrA key((char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2));
- strcpy(key, csenc);
+ mir_strcpy(key, csenc);
strcat(key, "&");
strcat(key, tsenc);
@@ -208,7 +208,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> &params, const char *httpmethod, con
ptrA tsenc( oauth_uri_escape(token_secret));
sign = (char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2);
- strcpy(sign, csenc);
+ mir_strcpy(sign, csenc);
strcat(sign, "&");
strcat(sign, tsenc);
}
@@ -227,7 +227,7 @@ char *oauth_generate_nonce()
int strSizeB = int(mir_strlen(timestamp) + sizeof(randnum));
ptrA str((char *)mir_calloc(strSizeB + 1));
- strcpy(str, timestamp);
+ mir_strcpy(str, timestamp);
strncat(str, randnum, sizeof(randnum));
BYTE digest[16];
@@ -273,7 +273,7 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD
}
res = (char *)mir_alloc(size);
- strcpy(res, "OAuth ");
+ mir_strcpy(res, "OAuth ");
for (i = 0; i < oauth_parameters.getCount(); i++) {
OAUTHPARAMETER *p = oauth_parameters[i];
@@ -299,7 +299,7 @@ int GGPROTO::oauth_receivetoken()
// 1. Obtaining an Unauthorized Request Token
debugLogA("oauth_receivetoken(): Obtaining an Unauthorized Request Token...");
- strcpy(szUrl, "http://api.gadu-gadu.pl/request_token");
+ mir_strcpy(szUrl, "http://api.gadu-gadu.pl/request_token");
str = oauth_auth_header("POST", szUrl, HMACSHA1, uin, password, NULL, NULL);
NETLIBHTTPHEADER httpHeaders[3];
@@ -356,7 +356,7 @@ int GGPROTO::oauth_receivetoken()
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
req.headersCount = 3;
req.headers = httpHeaders;
- strcpy(szUrl, "https://login.gadu-gadu.pl/authorize");
+ mir_strcpy(szUrl, "https://login.gadu-gadu.pl/authorize");
httpHeaders[1].szName = "Content-Type";
httpHeaders[1].szValue = "application/x-www-form-urlencoded";
req.pData = str;
@@ -368,7 +368,7 @@ int GGPROTO::oauth_receivetoken()
// 3. Obtaining an Access Token
debugLogA("oauth_receivetoken(): Obtaining an Access Token...");
- strcpy(szUrl, "http://api.gadu-gadu.pl/access_token");
+ mir_strcpy(szUrl, "http://api.gadu-gadu.pl/access_token");
mir_free(str);
str = oauth_auth_header("POST", szUrl, HMACSHA1, uin, password, token, token_secret);
mir_free(token);
diff --git a/protocols/Gadu-Gadu/src/token.cpp b/protocols/Gadu-Gadu/src/token.cpp
index e208becaf5..2fcf36d31d 100644
--- a/protocols/Gadu-Gadu/src/token.cpp
+++ b/protocols/Gadu-Gadu/src/token.cpp
@@ -112,8 +112,8 @@ int GGPROTO::gettoken(GGTOKEN *token)
GGTOKENDLGDATA dat = {0};
// Zero tokens
- strcpy(token->id, "");
- strcpy(token->val, "");
+ mir_strcpy(token->id, "");
+ mir_strcpy(token->val, "");
if (!(h = gg_token(0)) || gg_token_watch_fd(h) || h->state == GG_STATE_ERROR || h->state != GG_STATE_DONE) {
TCHAR error[128];
diff --git a/protocols/ICQCorp/src/corp.cpp b/protocols/ICQCorp/src/corp.cpp
index a1dd243c59..7b27d31966 100644
--- a/protocols/ICQCorp/src/corp.cpp
+++ b/protocols/ICQCorp/src/corp.cpp
@@ -71,7 +71,7 @@ extern "C" __declspec(dllexport) int Load()
GetModuleFileName(hInstance, fileName, MAX_PATH);
FindClose(FindFirstFile(fileName, &findData));
findData.cFileName[mir_strlen(findData.cFileName) - 4] = 0;
- strcpy(protoName, findData.cFileName);
+ mir_strcpy(protoName, findData.cFileName);
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 65fbaf3bed..9dadf66044 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -1572,8 +1572,8 @@ ICQEvent *ICQ::sendUrl(ICQUser *u, char *url)
descriptionLen = (unsigned int)mir_strlen(description);
m = new char[nameLen + descriptionLen + 2];
- strcpy(m, description);
- strcpy(m + descriptionLen + 1, url);
+ mir_strcpy(m, description);
+ mir_strcpy(m + descriptionLen + 1, url);
m[descriptionLen] = (char)0xFE;
result = send(u, ICQ_CMDxTCP_URL, "url", m);
@@ -2307,8 +2307,8 @@ void ICQ::addFileReq(ICQUser *u, char *m, char *filename, unsigned long size, un
szBlob = new char[sizeof(DWORD) + mir_strlen(filename) + mir_strlen(m) + 2];
*(PDWORD)szBlob = (DWORD)transfer;
- strcpy(szBlob + sizeof(DWORD), filename);
- strcpy(szBlob + sizeof(DWORD) + mir_strlen(filename) + 1, m);
+ mir_strcpy(szBlob + sizeof(DWORD), filename);
+ mir_strcpy(szBlob + sizeof(DWORD) + mir_strlen(filename) + 1, m);
ccs.hContact = u->hContact;
ccs.szProtoService = PSR_FILE;
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index 939fc619fc..e97dca0e4f 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -276,7 +276,7 @@ static INT_PTR icqSetAwayMsg(WPARAM wParam, LPARAM lParam)
if (icq.awayMessage) delete [] icq.awayMessage;
icq.awayMessage = new char[mir_strlen((char*)lParam) + 1];
- strcpy(icq.awayMessage, (char*)lParam);
+ mir_strcpy(icq.awayMessage, (char*)lParam);
return 0;
}
@@ -347,7 +347,7 @@ static INT_PTR icqSendFile(WPARAM wParam, LPARAM lParam)
if (filesCount == 1)
{
char *p = strrchr(files[0], '\\');
- strcpy(filename, p ? p+1 : files[0]);
+ mir_strcpy(filename, p ? p+1 : files[0]);
}
else sprintf(filename, filesCount == 1 ? Translate("%d file") : Translate("%d files"), filesCount);
}
@@ -526,7 +526,7 @@ static int icqModulesLoaded(WPARAM wParam, LPARAM lParam)
char *CreateServiceName(char *serviceName, char *functionName)
{
- strcpy(serviceName, protoName);
+ mir_strcpy(serviceName, protoName);
strcat(serviceName, functionName);
return serviceName;
diff --git a/protocols/ICQCorp/src/transfer.cpp b/protocols/ICQCorp/src/transfer.cpp
index a16369bd67..c864c6b3e9 100644
--- a/protocols/ICQCorp/src/transfer.cpp
+++ b/protocols/ICQCorp/src/transfer.cpp
@@ -397,7 +397,7 @@ void ICQTransfer::resume(int action, const char *newName)
T("[ ] rename file\n");
delete [] fileName;
fileName = new char[mir_strlen(newName) + 1];
- strcpy(fileName, newName);
+ mir_strcpy(fileName, newName);
files[current] = fileName;
openFile();
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index c1a816cb9f..4dcfef8772 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -48,7 +48,7 @@ void CIrcProto::InitMainMenus(void)
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("&Quick connect");
mi.icolibItem = GetIconHandle(IDI_QUICK);
- strcpy(d, IRC_QUICKCONNECT);
+ mir_strcpy(d, IRC_QUICKCONNECT);
mi.position = 201001;
mi.hParentMenu = hRoot;
hMenuQuick = Menu_AddProtoMenuItem(&mi);
@@ -57,26 +57,26 @@ void CIrcProto::InitMainMenus(void)
mi.pszName = LPGEN("&Join channel");
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN);
- strcpy(d, IRC_JOINCHANNEL);
+ mir_strcpy(d, IRC_JOINCHANNEL);
mi.position = 201002;
hMenuJoin = Menu_AddProtoMenuItem(&mi);
mi.pszName = LPGEN("&Change your nickname");
mi.icolibItem = GetIconHandle(IDI_RENAME);
- strcpy(d, IRC_CHANGENICK);
+ mir_strcpy(d, IRC_CHANGENICK);
mi.position = 201003;
hMenuNick = Menu_AddProtoMenuItem(&mi);
mi.pszName = LPGEN("Show the &list of available channels");
mi.icolibItem = GetIconHandle(IDI_LIST);
- strcpy(d, IRC_SHOWLIST);
+ mir_strcpy(d, IRC_SHOWLIST);
mi.position = 201004;
hMenuList = Menu_AddProtoMenuItem(&mi);
if (m_useServer) mi.flags &= ~CMIF_GRAYED;
mi.pszName = LPGEN("&Show the server window");
mi.icolibItem = GetIconHandle(IDI_SERVER);
- strcpy(d, IRC_SHOWSERVER);
+ mir_strcpy(d, IRC_SHOWSERVER);
mi.position = 201005;
hMenuServer = Menu_AddProtoMenuItem(&mi);
}
@@ -144,28 +144,28 @@ void InitContactMenus(void)
mi.pszName = LPGEN("Channel &settings");
mi.icolibItem = GetIconHandle(IDI_MANAGER);
- strcpy(d, IRC_UM_CHANSETTINGS);
+ mir_strcpy(d, IRC_UM_CHANSETTINGS);
mi.popupPosition = 500090002;
hUMenuChanSettings = Menu_AddContactMenuItem(&mi);
hMenuChanSettings = CreateServiceFunction(temp, IrcMenuChanSettings);
mi.pszName = LPGEN("&WhoIs info");
mi.icolibItem = GetIconHandle(IDI_WHOIS);
- strcpy(d, IRC_UM_WHOIS);
+ mir_strcpy(d, IRC_UM_WHOIS);
mi.popupPosition = 500090001;
hUMenuWhois = Menu_AddContactMenuItem(&mi);
hMenuWhois = CreateServiceFunction(temp, IrcMenuWhois);
mi.pszName = LPGEN("Di&sconnect");
mi.icolibItem = GetIconHandle(IDI_DELETE);
- strcpy(d, IRC_UM_DISCONNECT);
+ mir_strcpy(d, IRC_UM_DISCONNECT);
mi.popupPosition = 500090001;
hUMenuDisconnect = Menu_AddContactMenuItem(&mi);
hMenuDisconnect = CreateServiceFunction(temp, IrcMenuDisconnect);
mi.pszName = LPGEN("&Add to ignore list");
mi.icolibItem = GetIconHandle(IDI_BLOCK);
- strcpy(d, IRC_UM_IGNORE);
+ mir_strcpy(d, IRC_UM_IGNORE);
mi.popupPosition = 500090002;
hUMenuIgnore = Menu_AddContactMenuItem(&mi);
hMenuIgnore = CreateServiceFunction(temp, IrcMenuIgnore);
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;
}
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index e2d765b5d9..1fce21f81a 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -751,7 +751,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*)
char text[100];
if (hContact != NULL) {
if (nEmail == 0)
- strcpy(text, "e-mail");
+ mir_strcpy(text, "e-mail");
else
mir_snprintf(text, SIZEOF(text), "e-mail%d", nEmail - 1);
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 2c1b351fe6..79335a9182 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -433,7 +433,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
}
char text[ 256 ];
- strcpy(text, m_szModuleName);
+ mir_strcpy(text, m_szModuleName);
size_t nModuleNameLength = mir_strlen(text);
char* tDest = text + nModuleNameLength;
@@ -625,7 +625,7 @@ void CJabberProto::MenuInit()
// "Bookmarks..."
CreateProtoService("/Bookmarks", &CJabberProto::OnMenuHandleBookmarks);
- strcpy(tDest, "/Bookmarks");
+ mir_strcpy(tDest, "/Bookmarks");
mi.flags = CMIF_CHILDPOPUP;
mi.hParentMenu = hJabberRoot;
mi.pszName = LPGEN("Bookmarks");
@@ -635,14 +635,14 @@ void CJabberProto::MenuInit()
// "Services..."
mi.pszName = LPGEN("Services...");
- strcpy(tDest, "/Services");
+ mir_strcpy(tDest, "/Services");
mi.position = 200003;
mi.icolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
HGENMENU hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);
// "Service Discovery..."
CreateProtoService("/ServiceDiscovery", &CJabberProto::OnMenuHandleServiceDiscovery);
- strcpy(tDest, "/ServiceDiscovery");
+ mir_strcpy(tDest, "/ServiceDiscovery");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Service Discovery");
mi.position = 2000050001;
@@ -651,28 +651,28 @@ void CJabberProto::MenuInit()
m_hMenuServiceDiscovery = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/SD/MyTransports", &CJabberProto::OnMenuHandleServiceDiscoveryMyTransports);
- strcpy(tDest, "/SD/MyTransports");
+ mir_strcpy(tDest, "/SD/MyTransports");
mi.pszName = LPGEN("Registered Transports");
mi.position = 2000050003;
mi.icolibItem = GetIconHandle(IDI_TRANSPORTL);
m_hMenuSDMyTransports = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/SD/Transports", &CJabberProto::OnMenuHandleServiceDiscoveryTransports);
- strcpy(tDest, "/SD/Transports");
+ mir_strcpy(tDest, "/SD/Transports");
mi.pszName = LPGEN("Local Server Transports");
mi.position = 2000050004;
mi.icolibItem = GetIconHandle(IDI_TRANSPORT);
m_hMenuSDTransports = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/SD/Conferences", &CJabberProto::OnMenuHandleServiceDiscoveryConferences);
- strcpy(tDest, "/SD/Conferences");
+ mir_strcpy(tDest, "/SD/Conferences");
mi.pszName = LPGEN("Browse chatrooms");
mi.position = 2000050005;
mi.icolibItem = GetIconHandle(IDI_GROUP);
m_hMenuSDConferences = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/Groupchat", &CJabberProto::OnMenuHandleJoinGroupchat);
- strcpy(tDest, "/Groupchat");
+ mir_strcpy(tDest, "/Groupchat");
mi.pszName = LPGEN("Create/Join group chat");
mi.position = 2000050006;
mi.icolibItem = GetIconHandle(IDI_GROUP);
@@ -680,7 +680,7 @@ void CJabberProto::MenuInit()
// "Change Password..."
CreateProtoService("/ChangePassword", &CJabberProto::OnMenuHandleChangePassword);
- strcpy(tDest, "/ChangePassword");
+ mir_strcpy(tDest, "/ChangePassword");
mi.pszName = LPGEN("Change Password");
mi.position = 2000050007;
mi.icolibItem = GetIconHandle(IDI_KEYS);
@@ -688,7 +688,7 @@ void CJabberProto::MenuInit()
// "Roster editor"
CreateProtoService("/RosterEditor", &CJabberProto::OnMenuHandleRosterControl);
- strcpy(tDest, "/RosterEditor");
+ mir_strcpy(tDest, "/RosterEditor");
mi.pszName = LPGEN("Roster editor");
mi.position = 2000050009;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
@@ -696,14 +696,14 @@ void CJabberProto::MenuInit()
// "XML Console"
CreateProtoService("/XMLConsole", &CJabberProto::OnMenuHandleConsole);
- strcpy(tDest, "/XMLConsole");
+ mir_strcpy(tDest, "/XMLConsole");
mi.pszName = LPGEN("XML Console");
mi.position = 2000050010;
mi.icolibItem = GetIconHandle(IDI_CONSOLE);
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/Notes", &CJabberProto::OnMenuHandleNotes);
- strcpy(tDest, "/Notes");
+ mir_strcpy(tDest, "/Notes");
mi.pszName = LPGEN("Notes");
mi.position = 2000050011;
mi.icolibItem = GetIconHandle(IDI_NOTES);
@@ -834,19 +834,19 @@ void CJabberProto::GlobalMenuInit()
hkd.ptszSection = m_tszUserName;
hkd.dwFlags = HKD_TCHAR;
- strcpy(tDest, "/Groupchat");
+ mir_strcpy(tDest, "/Groupchat");
hkd.ptszDescription = LPGENT("Join conference");
Hotkey_Register(&hkd);
- strcpy(tDest, "/Bookmarks");
+ mir_strcpy(tDest, "/Bookmarks");
hkd.ptszDescription = LPGENT("Open bookmarks");
Hotkey_Register(&hkd);
- strcpy(tDest, "/PrivacyLists");
+ mir_strcpy(tDest, "/PrivacyLists");
hkd.ptszDescription = LPGENT("Privacy lists");
Hotkey_Register(&hkd);
- strcpy(tDest, "/ServiceDiscovery");
+ mir_strcpy(tDest, "/ServiceDiscovery");
hkd.ptszDescription = LPGENT("Service discovery");
Hotkey_Register(&hkd);
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 672857fe74..844dc54ba7 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -87,10 +87,10 @@ void CJabberProto::DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick)
PBYTE pCurBlob = dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
*((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD);
*((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD);
- strcpy((char*)pCurBlob, szNick); pCurBlob += mir_strlen(szNick)+1;
+ mir_strcpy((char*)pCurBlob, szNick); pCurBlob += mir_strlen(szNick)+1;
*pCurBlob = '\0'; pCurBlob++; //firstName
*pCurBlob = '\0'; pCurBlob++; //lastName
- strcpy((char*)pCurBlob, szJid); pCurBlob += mir_strlen(szJid)+1;
+ mir_strcpy((char*)pCurBlob, szJid); pCurBlob += mir_strlen(szJid)+1;
*pCurBlob = '\0'; //reason
db_event_add(NULL, &dbei);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index 1638ad1054..6f349e9d0d 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -364,7 +364,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
mi.pszService = szServiceFunction;
for (size_t i = 0; i < dwCount; i++) {
- strcpy(pszServiceFunctionName, pgdiItems[i].szName);
+ mir_strcpy(pszServiceFunctionName, pgdiItems[i].szName);
mi.position = int(lPosition + i);
mi.icolibItem = pgdiItems[i].hIcolib;
mi.pszName = pgdiItems[i].szDescr;
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index a0e221132f..7696a4d673 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -160,7 +160,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
char* szPassportHost = (char*)mir_alloc(256);
if (db_get_static(NULL, m_szModuleName, "MsnPassportHost", szPassportHost, 256))
- strcpy(szPassportHost, defaultPassportUrl);
+ mir_strcpy(szPassportHost, defaultPassportUrl);
bool defaultUrlAllow = mir_strcmp(szPassportHost, defaultPassportUrl) != 0;
char *tResult = NULL;
@@ -171,7 +171,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
tResult = getSslResult(&szPassportHost, szAuthInfo, NULL, status);
if (tResult == NULL) {
if (defaultUrlAllow) {
- strcpy(szPassportHost, defaultPassportUrl);
+ mir_strcpy(szPassportHost, defaultPassportUrl);
defaultUrlAllow = false;
continue;
}
@@ -253,14 +253,14 @@ int CMsnProto::MSN_GetPassportAuth(void)
ezxml_t tokf = ezxml_get(xml, "S:Body", 0, "S:Fault", 0, "S:Detail", -1);
ezxml_t tokrdr = ezxml_child(tokf, "psf:redirectUrl");
if (tokrdr != NULL) {
- strcpy(szPassportHost, ezxml_txt(tokrdr));
+ mir_strcpy(szPassportHost, ezxml_txt(tokrdr));
debugLogA("Redirected to '%s'", szPassportHost);
}
else {
const char* szFault = ezxml_txt(ezxml_get(tokf, "psf:error", 0, "psf:value", -1));
retVal = mir_strcmp(szFault, "0x80048821") == 0 ? 3 : (tokf ? 5 : 7);
if (retVal != 3 && defaultUrlAllow) {
- strcpy(szPassportHost, defaultPassportUrl);
+ mir_strcpy(szPassportHost, defaultPassportUrl);
defaultUrlAllow = false;
retVal = -1;
}
@@ -278,7 +278,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
default:
if (defaultUrlAllow) {
- strcpy(szPassportHost, defaultPassportUrl);
+ mir_strcpy(szPassportHost, defaultPassportUrl);
defaultUrlAllow = false;
}
else
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index e460d2942d..d80bddf470 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -1244,8 +1244,8 @@ LBL_InvalidCommand:
if (xmltgt)
{
ThreadData* newThread = new ThreadData;
- strcpy(newThread->mServer, xmltgt->txt);
- strcpy(newThread->mState, ezxml_txt(ezxml_child(xmlxfr, "state")));
+ mir_strcpy(newThread->mServer, xmltgt->txt);
+ mir_strcpy(newThread->mState, ezxml_txt(ezxml_child(xmlxfr, "state")));
newThread->mType = SERVER_NOTIFICATION;
newThread->mTrid = info->mTrid;
newThread->mIsMainThread = true;
@@ -1377,7 +1377,7 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email,
}
newThread->mMsnFtp = info->mMsnFtp; info->mMsnFtp = NULL;
- strcpy(newThread->mCookie, AuthCookie);
+ mir_strcpy(newThread->mCookie, AuthCookie);
newThread->startThread(&CMsnProto::MSNServerThread, this);
return;
@@ -2110,7 +2110,7 @@ LBL_InvalidCommand:
}
ThreadData* newThread = new ThreadData;
- strcpy(newThread->mServer, data.newServer);
+ mir_strcpy(newThread->mServer, data.newServer);
newThread->gatewayType = atol(data.genGateway) != 0;
newThread->mType = SERVER_SWITCHBOARD;
newThread->mInitialContactWLID = mir_strdup(data.callerEmail);
@@ -2312,7 +2312,7 @@ LBL_InvalidCommand:
if (!mir_strcmp(data.type, "NS")) { //notification server
UrlDecode(data.newServer);
ThreadData* newThread = new ThreadData;
- strcpy(newThread->mServer, data.newServer);
+ mir_strcpy(newThread->mServer, data.newServer);
newThread->mType = SERVER_NOTIFICATION;
newThread->mTrid = info->mTrid;
newThread->mIsMainThread = true;
@@ -2336,11 +2336,11 @@ LBL_InvalidCommand:
}
ThreadData* newThread = new ThreadData;
- strcpy(newThread->mServer, data.newServer);
+ mir_strcpy(newThread->mServer, data.newServer);
newThread->gatewayType = data.genGateway && atol(data.genGateway) != 0;
newThread->mType = SERVER_SWITCHBOARD;
newThread->mCaller = 1;
- strcpy(newThread->mCookie, data.authChallengeInfo);
+ mir_strcpy(newThread->mCookie, data.authChallengeInfo);
debugLogA("Opening switchboard server '%s'...", data.newServer);
newThread->startThread(&CMsnProto::MSNServerThread, this);
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp
index df6a63679e..aab87a0629 100644
--- a/protocols/MSN/src/msn_ftold.cpp
+++ b/protocols/MSN/src/msn_ftold.cpp
@@ -333,7 +333,7 @@ void CMsnProto::msnftp_startFileSend(ThreadData* info, const char* Invcommand, c
const PIN_ADDR addr = (PIN_ADDR)he->h_addr_list[0];
if (addr)
- strcpy(hostname, inet_ntoa(*addr));
+ mir_strcpy(hostname, inet_ntoa(*addr));
else
hostname[0] = 0;
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp
index c6ed14098e..78e9c66584 100644
--- a/protocols/MSN/src/msn_libstr.cpp
+++ b/protocols/MSN/src/msn_libstr.cpp
@@ -182,11 +182,11 @@ char* HtmlEncode(const char *str)
if ((s = (char*)mir_alloc(c + 1)) != NULL) {
for (p = (char*)str, q = s; *p != '\0'; p++) {
switch (*p) {
- case '&': strcpy(q, "&amp;"); q += 5; break;
- case '\'': strcpy(q, "&apos;"); q += 6; break;
- case '>': strcpy(q, "&gt;"); q += 4; break;
- case '<': strcpy(q, "&lt;"); q += 4; break;
- case '"': strcpy(q, "&quot;"); q += 6; break;
+ case '&': mir_strcpy(q, "&amp;"); q += 5; break;
+ case '\'': mir_strcpy(q, "&apos;"); q += 6; break;
+ case '>': mir_strcpy(q, "&gt;"); q += 4; break;
+ case '<': mir_strcpy(q, "&lt;"); q += 4; break;
+ case '"': mir_strcpy(q, "&quot;"); q += 6; break;
default: *q = *p; q++; break;
}
}
@@ -275,12 +275,12 @@ void stripHTML(char* str)
{
if ( *p == '<' )
{
- if ( !strnicmp( p, "<p>", 3 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
- else if ( !strnicmp( p, "</p>", 4 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<br>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<br />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
- else if ( !strnicmp( p, "<hr>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<hr />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
+ if ( !strnicmp( p, "<p>", 3 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
+ else if ( !strnicmp( p, "</p>", 4 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<br>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<br />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
+ else if ( !strnicmp( p, "<hr>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<hr />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
else {
char *l = strchr(p, '>');
if (l) { p = l; --q; } else *q = *p;
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 82cbbc7a8e..bbe49cf4b4 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -273,7 +273,7 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM)
void CMsnProto::MsnInitMainMenu(void)
{
char servicefunction[100];
- strcpy(servicefunction, m_szModuleName);
+ mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
CLISTMENUITEM mi = { sizeof(mi) };
@@ -296,35 +296,35 @@ void CMsnProto::MsnInitMainMenu(void)
mi.hParentMenu = hRoot;
mi.pszService = servicefunction;
- strcpy(tDest, MS_SET_NICKNAME_UI);
+ mir_strcpy(tDest, MS_SET_NICKNAME_UI);
CreateProtoService(MS_SET_NICKNAME_UI, &CMsnProto::SetNicknameUI);
mi.position = 201001;
mi.icolibItem = GetIconHandle(IDI_MSN);
mi.pszName = LPGEN("Set &Nickname");
menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
- strcpy(tDest, MSN_INVITE);
+ mir_strcpy(tDest, MSN_INVITE);
CreateProtoService(MSN_INVITE, &CMsnProto::MsnInviteCommand);
mi.position = 201002;
mi.icolibItem = GetIconHandle(IDI_INVITE);
mi.pszName = LPGEN("Create &Chat");
menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
- strcpy(tDest, MS_GOTO_INBOX);
+ mir_strcpy(tDest, MS_GOTO_INBOX);
CreateProtoService(MS_GOTO_INBOX, &CMsnProto::MsnGotoInbox);
mi.position = 201003;
mi.icolibItem = GetIconHandle(IDI_INBOX);
mi.pszName = LPGEN("Display &Hotmail Inbox");
menuItemsMain[1] = Menu_AddProtoMenuItem(&mi);
- strcpy(tDest, MS_EDIT_PROFILE);
+ mir_strcpy(tDest, MS_EDIT_PROFILE);
CreateProtoService(MS_EDIT_PROFILE, &CMsnProto::MsnEditProfile);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
mi.pszName = LPGEN("View &Profile");
menuItemsMain[2] = Menu_AddProtoMenuItem(&mi);
- strcpy(tDest, MS_EDIT_ALERTS);
+ mir_strcpy(tDest, MS_EDIT_ALERTS);
CreateProtoService(MS_EDIT_ALERTS, &CMsnProto::MsnSetupAlerts);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
@@ -409,20 +409,20 @@ static int MSN_OnPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
void MSN_InitContactMenu(void)
{
char servicefunction[100];
- strcpy(servicefunction, "MSN");
+ mir_strcpy(servicefunction, "MSN");
char* tDest = servicefunction + mir_strlen(servicefunction);
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = servicefunction;
- strcpy(tDest, MSN_BLOCK);
+ mir_strcpy(tDest, MSN_BLOCK);
hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
mi.position = -500050000;
mi.icolibItem = GetIconHandle(IDI_MSNBLOCK);
mi.pszName = LPGEN("&Block");
hBlockMenuItem = Menu_AddContactMenuItem(&mi);
- strcpy(tDest, MSN_VIEW_PROFILE);
+ mir_strcpy(tDest, MSN_VIEW_PROFILE);
hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
mi.position = -500050003;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
@@ -430,7 +430,7 @@ void MSN_InitContactMenu(void)
hLiveSpaceMenuItem = Menu_AddContactMenuItem(&mi);
#ifdef OBSOLETE
- strcpy(tDest, MSN_NETMEETING);
+ mir_strcpy(tDest, MSN_NETMEETING);
hNetMeeting = CreateServiceFunction(servicefunction, MsnMenuSendNetMeeting);
mi.flags = CMIF_NOTOFFLINE;
mi.position = -500050002;
@@ -439,7 +439,7 @@ void MSN_InitContactMenu(void)
hNetmeetingMenuItem = Menu_AddContactMenuItem(&mi);
#endif
- strcpy(tDest, "/SendHotmail");
+ mir_strcpy(tDest, "/SendHotmail");
hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
mi.position = -2000010005;
mi.flags = CMIF_HIDDEN;
diff --git a/protocols/MSN/src/msn_mime.cpp b/protocols/MSN/src/msn_mime.cpp
index 7545c5759d..131e9bfd39 100644
--- a/protocols/MSN/src/msn_mime.cpp
+++ b/protocols/MSN/src/msn_mime.cpp
@@ -226,7 +226,7 @@ const char* MimeHeaders::find(const char* szFieldName)
for (i = 0; i < mCount; i++) {
MimeHeader& MH = mVals[i];
if (_stricmp(MH.name, szFieldNameR) == 0 && (MH.flags & 3) == 0) {
- strcpy((char*)MH.name, szFieldNameR);
+ mir_strcpy((char*)MH.name, szFieldNameR);
flipStr(MH.value, -1, (char*)MH.value);
return MH.value;
}
@@ -434,7 +434,7 @@ wchar_t* MimeHeaders::decode(const char* val)
case 'B':
{
char* dec = (char*)mir_base64_decode(fld, 0);
- strcpy(fld, dec);
+ mir_strcpy(fld, dec);
mir_free(dec);
break;
}
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 7408bd7df4..84b629f168 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -106,11 +106,11 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const ch
*(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
*(PDWORD)pCurBlob = (DWORD)hContact; pCurBlob += sizeof(DWORD); // Contact Handle
- strcpy(pCurBlob, nick); pCurBlob += nicklen + 1; // Nickname
+ mir_strcpy(pCurBlob, nick); pCurBlob += nicklen + 1; // Nickname
*pCurBlob = '\0'; pCurBlob++; // First Name
*pCurBlob = '\0'; pCurBlob++; // Last Name
- strcpy(pCurBlob, email); pCurBlob += emaillen + 1; // E-mail
- strcpy(pCurBlob, reason); // Reason
+ mir_strcpy(pCurBlob, email); pCurBlob += emaillen + 1; // E-mail
+ mir_strcpy(pCurBlob, reason); // Reason
ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
}
@@ -152,7 +152,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl)
for (int i = 0;; i++) {
char szSetting[20];
if (i == 0)
- strcpy(szSetting, "Url");
+ mir_strcpy(szSetting, "Url");
else
mir_snprintf(szSetting, SIZEOF(szSetting), "Url%d", i);
pszUrlAttr = ezxml_attr(xmli, szSetting);
@@ -446,7 +446,7 @@ int ThreadData::sendMessage(int msgType, const char* email, int netId, const cha
pszMsgType = "Text";
pszContType = "Text/plain; charset=UTF-8";
- strcpy(tFontName, "Arial");
+ mir_strcpy(tFontName, "Arial");
if (proto->getByte("SendFontInfo", 1)) {
char* p;
@@ -930,7 +930,7 @@ void CMsnProto::MsnInvokeMyURL(bool ismail, const char* url)
char passport[256];
if (db_get_static(NULL, m_szModuleName, "MsnPassportHost", passport, 256))
- strcpy(passport, "https://login.live.com/");
+ mir_strcpy(passport, "https://login.live.com/");
char *p = strchr(passport, '/');
if (p && p[1] == '/') p = strchr(p + 2, '/');
@@ -1283,7 +1283,7 @@ void directconnection::xNonceToBin(UUID* nonce)
{
size_t len = mir_strlen(xNonce);
char *p = (char*)alloca(len);
- strcpy(p, xNonce + 1);
+ mir_strcpy(p, xNonce + 1);
p[len - 2] = 0;
UuidFromStringA((BYTE*)p, nonce);
}
@@ -1416,7 +1416,7 @@ void MSN_MakeDigest(const char* chl, char* dgst)
md5hashOr[3] ^= low;
char* str = arrayToHex((PBYTE)md5hashOr, sizeof(md5hashOr));
- strcpy(dgst, str);
+ mir_strcpy(dgst, str);
mir_free(str);
}
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 4a92c04457..4edbd0fa4e 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -205,7 +205,7 @@ LBL_Continue:
if (strchr(szFile, ' ') != NULL) {
char tmpBuf[MAX_PATH + 2];
mir_snprintf(tmpBuf, SIZEOF(tmpBuf), "\"%s\"", szFile);
- strcpy(szFile, tmpBuf);
+ mir_strcpy(szFile, tmpBuf);
}
SendMessage(tEditField, EM_SETSEL, 0, tSelectLen);
@@ -228,7 +228,7 @@ LBL_Continue:
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
if (mir_strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
reconnectRequired = true;
- strcpy(proto->MyOptions.szEmail, szEmail);
+ mir_strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
proto->setDword("netId", proto->GetMyNetID());
@@ -553,7 +553,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
if (mir_strcmp(szEmail, proto->MyOptions.szEmail)) {
- strcpy(proto->MyOptions.szEmail, szEmail);
+ mir_strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
proto->setDword("netId", proto->GetMyNetID());
@@ -681,10 +681,10 @@ void CMsnProto::LoadOptions(void)
if (db_get_static(NULL, m_szModuleName, "MachineGuid", MyOptions.szMachineGuid, sizeof(MyOptions.szMachineGuid))) {
char* uuid = getNewUuid();
- strcpy(MyOptions.szMachineGuid, uuid);
+ mir_strcpy(MyOptions.szMachineGuid, uuid);
setString("MachineGuid", MyOptions.szMachineGuid);
mir_free(uuid);
}
- strcpy(MyOptions.szMachineGuidP2P, MyOptions.szMachineGuid);
+ mir_strcpy(MyOptions.szMachineGuidP2P, MyOptions.szMachineGuid);
_strlwr(MyOptions.szMachineGuidP2P);
}
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp
index 46b85d9f43..4116b0a3f4 100644
--- a/protocols/MSN/src/msn_p2p.cpp
+++ b/protocols/MSN/src/msn_p2p.cpp
@@ -996,7 +996,7 @@ void CMsnProto::p2p_sendFeedStart(filetransfer* ft)
if (ft->std.flags & PFTS_SENDING) {
ThreadData* newThread = new ThreadData;
newThread->mType = SERVER_FILETRANS;
- strcpy(newThread->mCookie, ft->p2p_callID);
+ mir_strcpy(newThread->mCookie, ft->p2p_callID);
newThread->mInitialContactWLID = mir_strdup(ft->p2p_dest);
newThread->startThread(&CMsnProto::p2p_sendFeedThread, this);
}
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp
index a10dbd11f0..b6bd4193b2 100644
--- a/protocols/MSN/src/msn_soapstore.cpp
+++ b/protocols/MSN/src/msn_soapstore.cpp
@@ -75,7 +75,7 @@ char* CMsnProto::GetStoreHost(const char* service)
char* host = (char*)mir_alloc(256);
if (db_get_static(NULL, m_szModuleName, hostname, host, 256) || !*host)
- strcpy(host, "https://tkrdr.storage.msn.com/storageservice/SchematizedStore.asmx");
+ mir_strcpy(host, "https://tkrdr.storage.msn.com/storageservice/SchematizedStore.asmx");
return host;
}
diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp
index 83ded62832..41ba2551db 100644
--- a/protocols/MSN/src/msn_threads.cpp
+++ b/protocols/MSN/src/msn_threads.cpp
@@ -113,20 +113,20 @@ void __cdecl CMsnProto::MSNServerThread(void* arg)
if (usingGateway) {
if (info->mServer[0] == 0)
- strcpy(info->mServer, MSN_DEFAULT_LOGIN_SERVER);
+ mir_strcpy(info->mServer, MSN_DEFAULT_LOGIN_SERVER);
else if (info->mIsMainThread)
- strcpy(info->mGatewayIP, info->mServer);
+ mir_strcpy(info->mGatewayIP, info->mServer);
if (info->gatewayType)
- strcpy(info->mGatewayIP, info->mServer);
+ mir_strcpy(info->mGatewayIP, info->mServer);
else {
if (info->mGatewayIP[0] == 0 && db_get_static(NULL, m_szModuleName, "GatewayServer", info->mGatewayIP, sizeof(info->mGatewayIP)))
- strcpy(info->mGatewayIP, MSN_DEFAULT_GATEWAY);
+ mir_strcpy(info->mGatewayIP, MSN_DEFAULT_GATEWAY);
}
}
else {
if (info->mServer[0] == 0 && db_get_static(NULL, m_szModuleName, "DirectServer", info->mServer, sizeof(info->mServer)))
- strcpy(info->mServer, MSN_DEFAULT_LOGIN_SERVER);
+ mir_strcpy(info->mServer, MSN_DEFAULT_LOGIN_SERVER);
}
NETLIBOPENCONNECTION tConn = { 0 };
@@ -644,13 +644,13 @@ void ThreadData::processSessionData(const char* xMsgr, const char* xHost)
if (tDelim2 != NULL)
*tDelim2 = '\0';
if (xHost)
- strcpy(tGateIP, xHost);
+ mir_strcpy(tGateIP, xHost);
else if (!sscanf(tDelim, "GW-IP=%s", tGateIP))
return;
- strcpy(mGatewayIP, tGateIP);
- if (gatewayType) strcpy(mServer, tGateIP);
- strcpy(mSessionID, tSessionID);
+ mir_strcpy(mGatewayIP, tGateIP);
+ if (gatewayType) mir_strcpy(mServer, tGateIP);
+ mir_strcpy(mSessionID, tSessionID);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp
index f65b6c3b87..e6b0332ebb 100644
--- a/protocols/Sametime/src/files.cpp
+++ b/protocols/Sametime/src/files.cpp
@@ -148,7 +148,7 @@ void mwFileTransfer_closed(mwFileTransfer* ft, guint32 code)
if (code != mwFileTransfer_SUCCESS || !mwFileTransfer_isDone(ft)) {
if (!ftcd->sending) {
char fn[MAX_PATH];
- if (ftcd->save_path) strcpy(fn, ftcd->save_path);
+ if (ftcd->save_path) mir_strcpy(fn, ftcd->save_path);
else fn[0] = 0;
strcat(fn, mwFileTransfer_getFileName(ft));
@@ -373,7 +373,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s
if (fn) fn++;
if (ftcd->save_path)
- strcpy(fp, ftcd->save_path);
+ mir_strcpy(fp, ftcd->save_path);
else
fp[0] = 0;
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp
index 5d1f077911..f9a2ee775f 100644
--- a/protocols/Sametime/src/options.cpp
+++ b/protocols/Sametime/src/options.cpp
@@ -294,11 +294,11 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
TCHAR ws[2048];
GetDlgItemText(hwndDlg, IDC_ED_SNAME, ws, LSTRINGLEN);
- strcpy(proto->options.server_name, T2Utf(ws));
+ mir_strcpy(proto->options.server_name, T2Utf(ws));
GetDlgItemText(hwndDlg, IDC_ED_NAME, ws, LSTRINGLEN);
- strcpy(proto->options.id, T2Utf(ws));
+ mir_strcpy(proto->options.id, T2Utf(ws));
GetDlgItemText(hwndDlg, IDC_ED_PWORD, ws, LSTRINGLEN);
- strcpy(proto->options.pword, T2Utf(ws));
+ mir_strcpy(proto->options.pword, T2Utf(ws));
BOOL translated;
int port = GetDlgItemInt(hwndDlg, IDC_ED_PORT, &translated, FALSE);
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index c0ee790d85..20fbdef920 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -118,7 +118,7 @@ void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpoint
case mwSession_LOGIN_REDIR:
proto->debugLog(_T("SessionStateChange() mwSession_LOGIN_REDIR info=[%s]"), _A2T((char*)info));
//options.server_name = str((char*)info);
- strcpy(proto->options.server_name, (char*)info);
+ mir_strcpy(proto->options.server_name, (char*)info);
proto->LogOut();
proto->LogIn(proto->login_status, proto->m_hNetlibUser);
break;
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index 7e36cc65e8..c9fd84f4a9 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -87,7 +87,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
LVITEM lvI = { 0 };
char id[1024];
- strcpy(id, "@U"); // documentation says prepend '@U' to usernames and '@G' to notes group names - but
+ mir_strcpy(id, "@U"); // documentation says prepend '@U' to usernames and '@G' to notes group names - but
char *p = id + 2; // it's wrong - it works for a list of user id's with no prefix - so we'll do both
// build recipient list
@@ -104,7 +104,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
if (!db_get_utf((MCONTACT)lvI.lParam, proto->m_szModuleName, "stid", &dbv)) {
safArg->recipients = g_list_prepend(safArg->recipients, _strdup(dbv.pszVal));
- strcpy(p, dbv.pszVal);
+ mir_strcpy(p, dbv.pszVal);
safArg->recipients = g_list_prepend(safArg->recipients, _strdup(id));
send_count++;
db_free(&dbv);
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp
index 4204b25ece..147b467ecc 100644
--- a/protocols/SkypeClassic/src/skype.cpp
+++ b/protocols/SkypeClassic/src/skype.cpp
@@ -2179,8 +2179,8 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam)
}
if (!strncmp(szSkypeMsg, "PROTOCOL ", 9)) {
if ((protocol = (char)atoi(szSkypeMsg + 9)) >= 3) {
- strcpy(cmdMessage, "CHATMESSAGE");
- strcpy(cmdPartner, "FROM");
+ mir_strcpy(cmdMessage, "CHATMESSAGE");
+ mir_strcpy(cmdPartner, "FROM");
}
bProtocolSet = TRUE;
@@ -2434,7 +2434,7 @@ void RetrieveUserAvatar(void *param)
{
// Get filename
FoldersGetCustomPath(hProtocolAvatarsFolder, AvatarFile, sizeof(AvatarFile), DefaultAvatarsFolder);
- if (!*AvatarFile) strcpy(AvatarFile, DefaultAvatarsFolder);
+ if (!*AvatarFile) mir_strcpy(AvatarFile, DefaultAvatarsFolder);
mir_snprintf(AvatarTmpFile, SIZEOF(AvatarTmpFile), "AVATAR 1 %s\\%s_tmp.jpg", AvatarFile, dbv.pszVal);
pszTempFile = AvatarTmpFile + 9;
mir_snprintf(AvatarFile, SIZEOF(AvatarFile), "%s\\%s.jpg", AvatarFile, dbv.pszVal);
@@ -2544,7 +2544,7 @@ INT_PTR SkypeGetAvatarInfo(WPARAM wParam, LPARAM lParam)
// Return the avatar
AI->format = PA_FORMAT_JPEG;
- strcpy(AI->filename, AvatarFile);
+ mir_strcpy(AI->filename, AvatarFile);
return GAIR_SUCCESS;
}
}
@@ -2726,7 +2726,7 @@ INT_PTR SkypeSendMessage(WPARAM, LPARAM lParam) {
if (psendarg) {
psendarg->hContact = ccs->hContact;
- strcpy(psendarg->szId, szId);
+ mir_strcpy(psendarg->szId, szId);
pthread_create(MessageSendWatchThread, psendarg);
}
else
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp
index 5c464bae39..5d867494c0 100644
--- a/protocols/SkypeClassic/src/skypeapi.cpp
+++ b/protocols/SkypeClassic/src/skypeapi.cpp
@@ -709,7 +709,7 @@ INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam) {
} else {
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
msg=(char *)malloc(mir_strlen(dbv.pszVal)+6);
- strcpy(msg, "CALL ");
+ mir_strcpy(msg, "CALL ");
strcat(msg, dbv.pszVal);
res=SkypeSend(msg);
}
@@ -747,7 +747,7 @@ INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam)
//} else {
// if (db_get(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
// msg=(char *)malloc(mir_strlen(dbv.pszVal)+6);
- // strcpy(msg, "CALL ");
+ // mir_strcpy(msg, "CALL ");
// strcat(msg, dbv.pszVal);
// res=SkypeSend(msg);
return res;
@@ -864,7 +864,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);
- strcpy(msg, "CALL ");
+ mir_strcpy(msg, "CALL ");
strcat(msg, number);
if (SkypeSend(msg) || (ptr=SkypeRcv("ERROR", 500))) {
db_unset(hContact, SKYPE_PROTONAME, "SkypeOutNr");
@@ -1165,7 +1165,7 @@ INT_PTR SkypeSetAvatar(WPARAM wParam, LPARAM lParam) {
return -2;
FoldersGetCustomPath(hProtocolAvatarsFolder, AvatarFile, sizeof(AvatarFile), DefaultAvatarsFolder);
- if (!*AvatarFile) strcpy (AvatarFile, DefaultAvatarsFolder);
+ if (!*AvatarFile) mir_strcpy (AvatarFile, DefaultAvatarsFolder);
mir_snprintf(AvatarFile, SIZEOF(AvatarFile), "%s\\%s avatar.%s", AvatarFile, SKYPE_PROTONAME, ext);
// Backup old file
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp
index 9cd32df960..d46f6a2b87 100644
--- a/protocols/SkypeClassic/src/skypeopt.cpp
+++ b/protocols/SkypeClassic/src/skypeopt.cpp
@@ -675,13 +675,13 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
GetDlgItemTextA(hwndDlg,IDC_COMMANDLINE,szFileName,SIZEOF(szFileName));
TranslateMirandaRelativePathToAbsolute(szFileName, szAbsolutePath, FALSE);
- strcpy (szFileName, szAbsolutePath);
+ mir_strcpy (szFileName, szAbsolutePath);
BOOL gofnResult = GetOpenFileNameA(&ofn);
if (!gofnResult && CommDlgExtendedError() == FNERR_INVALIDFILENAME){
- strcpy(szFileName, ".\\Skype.exe");
+ mir_strcpy(szFileName, ".\\Skype.exe");
TranslateMirandaRelativePathToAbsolute(szFileName, szAbsolutePath, FALSE);
- strcpy (szFileName, szAbsolutePath);
+ mir_strcpy (szFileName, szAbsolutePath);
gofnResult = GetOpenFileNameA(&ofn);
}
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 5749916f27..c15a839e85 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -637,15 +637,15 @@ void CSteamProto::OnAuthRequested(const NETLIBHTTPREQUEST *response, void *arg)
pCurBlob += sizeof(DWORD);
*((PDWORD)pCurBlob) = (DWORD)hContact;
pCurBlob += sizeof(DWORD);
- strcpy((char*)pCurBlob, nickName);
+ mir_strcpy((char*)pCurBlob, nickName);
pCurBlob += mir_strlen(nickName) + 1;
- strcpy((char*)pCurBlob, firstName);
+ mir_strcpy((char*)pCurBlob, firstName);
pCurBlob += mir_strlen(firstName) + 1;
- strcpy((char*)pCurBlob, lastName);
+ mir_strcpy((char*)pCurBlob, lastName);
pCurBlob += mir_strlen(lastName) + 1;
- strcpy((char*)pCurBlob, steamId);
+ mir_strcpy((char*)pCurBlob, steamId);
pCurBlob += mir_strlen(steamId) + 1;
- strcpy((char*)pCurBlob, reason);
+ mir_strcpy((char*)pCurBlob, reason);
AddDBEvent(hContact, EVENTTYPE_AUTHREQUEST, time(NULL), DBEF_UTF, cbBlob, pBlob);
}
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index a7b9626fc5..b18e6862aa 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -125,7 +125,7 @@ void CSteamProto::OnInitStatusMenu()
mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;
// Show block list
- strcpy(tDest, "/BlockList");
+ mir_strcpy(tDest, "/BlockList");
CreateProtoService(tDest, &CSteamProto::OpenBlockListCommand);
mi.ptszName = LPGENT("Blocked contacts");
mi.position = 200000 + SMI_BLOCKED_LIST;
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);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index d2391def89..5ad228ab3e 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -257,7 +257,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
return 0;
char text[200];
- strcpy(text, m_szModuleName);
+ mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
CLISTMENUITEM mi = { sizeof(mi) };
@@ -271,7 +271,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
// TODO: Disable this menu item when offline
// "Send Tweet..."
CreateProtoService("/Tweet", &TwitterProto::OnTweet);
- strcpy(tDest, "/Tweet");
+ mir_strcpy(tDest, "/Tweet");
mi.ptszName = LPGENT("Send Tweet...");
mi.popupPosition = 200001;
mi.icolibItem = GetIconHandle("tweet");
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 357a094f69..f8ad79efd1 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -601,13 +601,13 @@ void CVkProto::DBAddAuthRequest(const MCONTACT hContact)
*((PDWORD)pCurBlob) = (DWORD)hContact;
pCurBlob += sizeof(DWORD); // hContact(DWORD)
- strcpy((char*)pCurBlob, szNick);
+ mir_strcpy((char*)pCurBlob, szNick);
pCurBlob += mir_strlen(szNick) + 1;
- strcpy((char*)pCurBlob, szFirstName);
+ mir_strcpy((char*)pCurBlob, szFirstName);
pCurBlob += mir_strlen(szFirstName) + 1;
- strcpy((char*)pCurBlob, szLastName);
+ mir_strcpy((char*)pCurBlob, szLastName);
pCurBlob += mir_strlen(szLastName) + 1;
*pCurBlob = '\0'; //email
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index e5c5b6c9f5..1557f85fb4 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -48,7 +48,7 @@ static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact)
int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
{
char text[200];
- strcpy(text, m_szModuleName);
+ mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
CLISTMENUITEM mi = { sizeof(mi) };
@@ -73,7 +73,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
mi.position = 201001;
CreateProtoService("/CreateGroup", &WhatsAppProto::OnCreateGroup);
- strcpy(tDest, "/CreateGroup");
+ mir_strcpy(tDest, "/CreateGroup");
mi.hParentMenu = hRoot;
mi.pszName = LPGEN("Create group");
mi.icolibItem = GetIconHandle("createGroup");
diff --git a/protocols/Xfire/src/SHA1.cpp b/protocols/Xfire/src/SHA1.cpp
index fd8c6eb2e6..0c1dc41a5b 100644
--- a/protocols/Xfire/src/SHA1.cpp
+++ b/protocols/Xfire/src/SHA1.cpp
@@ -249,7 +249,7 @@ void CSHA1::ReportHash(char *szReport, unsigned char uReportType)
strcat(szReport, szTemp);
}
}
- else strcpy(szReport, "Error: Unknown report type!");
+ else mir_strcpy(szReport, "Error: Unknown report type!");
}
// Get the raw message digest
diff --git a/protocols/Xfire/src/SHA1.h b/protocols/Xfire/src/SHA1.h
index 2bb15df86a..a64c8b589b 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 strcpy
+#include <string.h> // Needed for strcat and mir_strcpy
#include <iostream>
#include <stdlib.h>
diff --git a/protocols/Xfire/src/Xfire_base.cpp b/protocols/Xfire/src/Xfire_base.cpp
index dca9b7a3c3..17a24c2e0c 100644
--- a/protocols/Xfire/src/Xfire_base.cpp
+++ b/protocols/Xfire/src/Xfire_base.cpp
@@ -499,7 +499,7 @@ BOOL Xfire_base::getIniPath(char*path) {
//kein ziel abbruch
if (!path)
return FALSE;
- strcpy(path, XFireGetFoldersPath("IniFile"));
+ mir_strcpy(path, XFireGetFoldersPath("IniFile"));
strcat_s(path, MAX_PATH, "xfire_games.ini");
return TRUE;
}
@@ -508,7 +508,7 @@ BOOL Xfire_base::getIconPath(char*path) {
//kein ziel abbruch
if (!path)
return FALSE;
- strcpy(path, XFireGetFoldersPath("IconsFile"));
+ mir_strcpy(path, XFireGetFoldersPath("IconsFile"));
return TRUE;
}
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index f570dee912..31d43319e5 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -429,7 +429,7 @@ void Xfire_game::writeToDB(unsigned dbid)
void Xfire_game::createMenuitem(unsigned int pos, int dbid)
{
char servicefunction[100];
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "StartGame%d");
if (dbid < 0)
diff --git a/protocols/Xfire/src/addgamedialog.cpp b/protocols/Xfire/src/addgamedialog.cpp
index 3c8f50ada9..e729a80ab3 100644
--- a/protocols/Xfire/src/addgamedialog.cpp
+++ b/protocols/Xfire/src/addgamedialog.cpp
@@ -44,7 +44,7 @@ static void FillGameList(LPVOID hwndDlg) {
vector<DWORD> dublBuffer;
//Cache ist leer, Cache füllen
- strcpy(inipath, XFireGetFoldersPath("IniFile"));
+ mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
strcat_s(inipath, MAX_PATH, "xfire_games.ini");
//ini soll in den RAM geladen werden, fürs schnellere ausparsen
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index a94599b1f3..5b23f979f2 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1045,7 +1045,7 @@ extern "C" __declspec(dllexport) int Load(void)
XDEBUGS("-----------------------------------------------------\n");
//statusmessages setzen
- strcpy(statusmessage[0], "");
+ mir_strcpy(statusmessage[0], "");
mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
HookEvent(ME_OPT_INITIALISE, OptInit);
@@ -1123,7 +1123,7 @@ extern "C" __declspec(dllexport) int Load(void)
char servicefunction[100];
//gotoprofilemenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "GotoProfile");
CreateServiceFunction(servicefunction, GotoProfile);
mi.pszService = servicefunction;
@@ -1134,7 +1134,7 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddContactMenuItem(&mi);
//gotoxfireclansitemenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "GotoXFireClanSite");
CreateServiceFunction(servicefunction, GotoXFireClanSite);
mi.pszService = servicefunction;
@@ -1145,7 +1145,7 @@ extern "C" __declspec(dllexport) int Load(void)
gotoclansite = Menu_AddContactMenuItem(&mi);
//kopiermenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "GetIPPort");
CreateServiceFunction(servicefunction, GetIPPort);
mi.pszService = servicefunction;
@@ -1156,7 +1156,7 @@ extern "C" __declspec(dllexport) int Load(void)
copyipport = Menu_AddContactMenuItem(&mi);
//kopiermenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "VoiceIPPort");
CreateServiceFunction(servicefunction, GetVIPPort);
mi.pszService = servicefunction;
@@ -1167,7 +1167,7 @@ extern "C" __declspec(dllexport) int Load(void)
vipport = Menu_AddContactMenuItem(&mi);
//joinmenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "JoinGame");
CreateServiceFunction(servicefunction, JoinGame);
mi.pszService = servicefunction;
@@ -1178,7 +1178,7 @@ extern "C" __declspec(dllexport) int Load(void)
joingame = Menu_AddContactMenuItem(&mi);
//joinmenüpunkt
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "StartThisGame");
CreateServiceFunction(servicefunction, StartThisGame);
mi.pszService = servicefunction;
@@ -1189,7 +1189,7 @@ extern "C" __declspec(dllexport) int Load(void)
startthisgame = Menu_AddContactMenuItem(&mi);
//remove friend
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "RemoveFriend");
CreateServiceFunction(servicefunction, RemoveFriend);
mi.pszService = servicefunction;
@@ -1200,7 +1200,7 @@ extern "C" __declspec(dllexport) int Load(void)
removefriend = Menu_AddContactMenuItem(&mi);
//block user
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "BlockFriend");
CreateServiceFunction(servicefunction, BlockFriend);
mi.pszService = servicefunction;
@@ -1211,7 +1211,7 @@ extern "C" __declspec(dllexport) int Load(void)
blockfriend = Menu_AddContactMenuItem(&mi);
//my fire profile
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
mi.pszService = servicefunction;
@@ -1222,7 +1222,7 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddMainMenuItem(&mi);
//my activity protocol
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "GotoProfileAct");
CreateServiceFunction(servicefunction, GotoProfileAct);
mi.pszService = servicefunction;
@@ -1233,7 +1233,7 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddMainMenuItem(&mi);
//rescan my games
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "ReScanMyGames");
CreateServiceFunction(servicefunction, ReScanMyGames);
mi.pszService = servicefunction;
@@ -1243,7 +1243,7 @@ extern "C" __declspec(dllexport) int Load(void)
mi.ptszName = LPGENT("&Rescan my games...");
Menu_AddMainMenuItem(&mi);
- strcpy(servicefunction, protocolname);
+ mir_strcpy(servicefunction, protocolname);
strcat(servicefunction, "SetNick");
CreateServiceFunction(servicefunction, SetNickDlg);
mi.pszService = servicefunction;
@@ -1625,7 +1625,7 @@ MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline, int cla
XFire_SetAvatar* xsa = new XFire_SetAvatar;
xsa->hContact = hContact;
xsa->username = new char[mir_strlen(xfc.username) + 1];
- strcpy(xsa->username, xfc.username);
+ mir_strcpy(xsa->username, xfc.username);
mir_forkthread(SetAvatar, (LPVOID)xsa);
}
else
@@ -1875,7 +1875,7 @@ BOOL GetAvatar(char* username, XFireAvatar* av)
if (pos)
{
char filename[512];
- strcpy(filename, XFireGetFoldersPath("Avatar"));
+ mir_strcpy(filename, XFireGetFoldersPath("Avatar"));
strcat(filename, username);
pos++;
@@ -1927,7 +1927,7 @@ static INT_PTR GetIPPort(WPARAM hContact, LPARAM lParam)
HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
+ mir_strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT, clipbuffer);
@@ -1955,7 +1955,7 @@ static INT_PTR GetVIPPort(WPARAM hContact, LPARAM lParam)
HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
+ mir_strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT, clipbuffer);
@@ -1972,7 +1972,7 @@ static INT_PTR GotoProfile(WPARAM hContact, LPARAM lParam)
return 0;
char temp[64];
- strcpy(temp, "http://xfire.com/profile/");
+ mir_strcpy(temp, "http://xfire.com/profile/");
strcat_s(temp, 64, dbv.pszVal);
db_free(&dbv);
@@ -1992,7 +1992,7 @@ static INT_PTR GotoXFireClanSite(WPARAM hContact, LPARAM lParam)
if (db_get_s(NULL, protocolname, temp, &dbv))
return 0;
- strcpy(temp, "http://xfire.com/clans/");
+ mir_strcpy(temp, "http://xfire.com/clans/");
strcat_s(temp, 64, dbv.pszVal);
db_free(&dbv);
@@ -2008,7 +2008,7 @@ static INT_PTR GotoProfile2(WPARAM wParam, LPARAM lParam)
return 0;
char temp[64];
- strcpy(temp, "http://xfire.com/profile/");
+ mir_strcpy(temp, "http://xfire.com/profile/");
strcat_s(temp, 64, dbv.pszVal);
db_free(&dbv);
@@ -2024,7 +2024,7 @@ static INT_PTR GotoProfileAct(WPARAM wParam, LPARAM lParam)
if (db_get_s(NULL, protocolname, "login", &dbv))
return 0;
- strcpy(temp, "http://www.xfire.com/?username=");
+ mir_strcpy(temp, "http://www.xfire.com/?username=");
strcat_s(temp, 64, dbv.pszVal);
db_free(&dbv);
@@ -2613,7 +2613,7 @@ if (db_get(entry->hcontact,"ContactPhoto", "File",&dbv))
XFire_SetAvatar* xsa=new XFire_SetAvatar;
xsa->hContact=entry->hcontact;
xsa->username=new char[mir_strlen(entry->username.c_str())+1];
-strcpy(xsa->username,entry->username.c_str());
+mir_strcpy(xsa->username,entry->username.c_str());
mir_forkthread(SetAvatar,(LPVOID)xsa);
}
@@ -3126,7 +3126,7 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam)
{
if (wParam == ID_STATUS_ONLINE)
{
- strcpy(statusmessage[0], "");
+ mir_strcpy(statusmessage[0], "");
}
else if (wParam != ID_STATUS_OFFLINE/*&&db_get_b(NULL,protocolname,"nocustomaway",0)==0*/)
{
@@ -3137,12 +3137,12 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam)
{
if (wParam == ID_STATUS_ONLINE)
{
- strcpy(statusmessage[0], (char*)lParam);
+ mir_strcpy(statusmessage[0], (char*)lParam);
}
else if (wParam != ID_STATUS_OFFLINE) {
if (db_get_b(NULL, protocolname, "nocustomaway", 0) == 0 && mir_strlen((char*)lParam) > 0) {
mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", (char*)lParam);
- //strcpy(statusmessage[1],( char* )lParam);
+ //mir_strcpy(statusmessage[1],( char* )lParam);
}
else
mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp
index c108822805..e57aee4848 100644
--- a/protocols/Xfire/src/options.cpp
+++ b/protocols/Xfire/src/options.cpp
@@ -578,7 +578,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
//addgamedia auf 0 setzen
TranslateDialogDefault(hwndDlg);
- strcpy(inipath, XFireGetFoldersPath("IniFile"));
+ mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
strcat(inipath, "xfire_games.ini");
FILE * f = fopen(inipath, "r");
@@ -594,7 +594,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
inifound = FALSE;
}
- strcpy(inipath, XFireGetFoldersPath("IconsFile"));
+ mir_strcpy(inipath, XFireGetFoldersPath("IconsFile"));
strcat(inipath, "icons.dll");
f = fopen(inipath, "r");
@@ -618,7 +618,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
SendDlgItemMessage(hwndDlg, IDC_REMUSER, BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
- strcpy(inipath, XFireGetFoldersPath("IniFile"));
+ mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
SetDlgItemTextA(hwndDlg, IDC_FILESSHOULDBE, inipath);
EnableDlgItem(hwndDlg, IDC_REMUSER, FALSE);
@@ -897,7 +897,7 @@ static INT_PTR CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
EmptyClipboard();
clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(out)+1);
buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(out));
+ mir_strcpy(buffer, LPCSTR(out));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT, clipbuffer);
diff --git a/protocols/Xfire/src/passworddialog.cpp b/protocols/Xfire/src/passworddialog.cpp
index f6cdb167c8..4be5760eef 100644
--- a/protocols/Xfire/src/passworddialog.cpp
+++ b/protocols/Xfire/src/passworddialog.cpp
@@ -51,9 +51,9 @@ void ShowPasswordDialog(char*pw, char*mynick) {
usenick = FALSE;
char* npw = (char*)DialogBox(hinstance, MAKEINTRESOURCE(IDD_PWDLG), NULL, DlgPWProc);
- strcpy(pw, npw);
+ mir_strcpy(pw, npw);
if (mynick)
{
- strcpy(mynick, (char*)nick);
+ mir_strcpy(mynick, (char*)nick);
}
} \ No newline at end of file
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp
index 4d92a63f51..c0fd32c751 100644
--- a/protocols/Xfire/src/processbuddyinfo.cpp
+++ b/protocols/Xfire/src/processbuddyinfo.cpp
@@ -50,7 +50,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
db_unset(NULL, protocolname, "MyAvatarFile");
}
- strcpy(filename, XFireGetFoldersPath("Avatar"));
+ mir_strcpy(filename, XFireGetFoldersPath("Avatar"));
switch (buddyinfo->avatarmode) {
case 1:
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp
index e9d70c319e..80bf55faf0 100644
--- a/protocols/Xfire/src/searching4games.cpp
+++ b/protocols/Xfire/src/searching4games.cpp
@@ -76,7 +76,7 @@ BOOL CheckPath(char*ppath, char*pathwildcard = NULL)
if (GetFileAttributesA(temp) != 0xFFFFFFFF) { //exe vorhanden???? unt hint?
//gefundenes in path kopieren
FindClose(fHandle);
- strcpy(ppath, temp);
+ mir_strcpy(ppath, temp);
return TRUE;
}
}
@@ -242,7 +242,7 @@ void Scan4Games(LPVOID lparam)
mir_forkthread(ShowSearchDialog, &hwnd);
}
- strcpy(inipath, XFireGetFoldersPath("IniFile"));
+ mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
strcat(inipath, "xfire_games.ini");
//erstmal db säubern
@@ -278,7 +278,7 @@ void Scan4Games(LPVOID lparam)
//Registryschlüssel auslesen und pfad auf exe prüfen
xfire_GetPrivateProfileString(temp, "LauncherDirKey", "", ret, 255, inipath);
- strcpy(ret2, ret);
+ mir_strcpy(ret2, ret);
//ersten part des registry schlüssel raustrennen
pos = strchr(ret2, '\\');
@@ -342,7 +342,7 @@ void Scan4Games(LPVOID lparam)
pos2 = path;
pos2++;
- strcpy(path, pos2);
+ mir_strcpy(path, pos2);
}
//mögliche weitere anführungszeichen entfernen
@@ -362,7 +362,7 @@ void Scan4Games(LPVOID lparam)
if (xfire_GetPrivateProfileString(temp, "InstallHint", "", ret2, 255, inipath))
{
char pathtemp[XFIRE_MAX_STATIC_STRING_LEN];
- strcpy(pathtemp, path);
+ mir_strcpy(pathtemp, path);
strcat(pathtemp, ret2);
if (CheckPath(pathtemp))
@@ -370,7 +370,7 @@ void Scan4Games(LPVOID lparam)
if (xfire_GetPrivateProfileString(temp, "DetectExe", "", ret, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcpy(pathtemp, path);
+ mir_strcpy(pathtemp, path);
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret[0] == '\\')
@@ -384,7 +384,7 @@ void Scan4Games(LPVOID lparam)
if (CheckPath(pathtemp))
{
- strcpy(path, pathtemp);
+ mir_strcpy(path, pathtemp);
}
else
{
@@ -487,7 +487,7 @@ void Scan4Games(LPVOID lparam)
path[i2] = tolower(path[i2]);
char* mpathtemp = new char[mir_strlen(path) + 1];
- strcpy(mpathtemp, path);
+ mir_strcpy(mpathtemp, path);
newgame->mpath.push_back(mpathtemp);
}
}
@@ -506,7 +506,7 @@ void Scan4Games(LPVOID lparam)
//pfad aufbereiten
char launchpath[XFIRE_MAX_STATIC_STRING_LEN] = "";
- strcpy(launchpath, path);
+ mir_strcpy(launchpath, path);
//letzten backslash entfernen
if (launchpath[mir_strlen(launchpath) - 1] == '\\') launchpath[mir_strlen(launchpath) - 1] = 0;
@@ -617,7 +617,7 @@ void Scan4Games(LPVOID lparam)
//pfad aufbereiten
char launchpath[XFIRE_MAX_STATIC_STRING_LEN] = "";
- strcpy(launchpath, ret2);
+ mir_strcpy(launchpath, ret2);
if (strrchr(launchpath, '\\') != 0)
{
*(strrchr(launchpath, '\\')) = 0;
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 38dcb396e8..3b1427d3af 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -37,7 +37,7 @@ extern HANDLE hNetlib;
/*char* tohex(unsigned char*buf,int size) {
static char buffer[1024*10]="";
- strcpy(buffer,"");
+ mir_strcpy(buffer,"");
for(int i=0;i<size;i++)
{
@@ -67,12 +67,12 @@ BOOL str_replace(char*src, char*find, char*rep)
{
char *temp = new char[mir_strlen(src) + mir_strlen(rep) + 1];
- strcpy(temp, src);
+ mir_strcpy(temp, src);
*(temp + pos) = 0;
strcat(temp, rep);
strcat(temp, (src + pos + mir_strlen(find)));
- strcpy(src, temp);
+ mir_strcpy(src, temp);
delete[] temp;
diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp
index 4a38300ca6..37840a72c1 100644
--- a/protocols/Xfire/src/userdetails.cpp
+++ b/protocols/Xfire/src/userdetails.cpp
@@ -103,7 +103,7 @@ static int GetIPPortUDetails(MCONTACT hContact, char* feld1, char* feld2)
HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, LPCSTR(temp));
+ mir_strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT, clipbuffer);