summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
commitbabf7873a3fe373d60ef22b1b671d98e014d8819 (patch)
treee21dfdb68839616efbbd884dfa77a1745f1c35d7
parenta89887eb202c99ce09107668561abce6704f9004 (diff)
replace strcpy to mir_strcpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/AVS/src/services.cpp2
-rw-r--r--plugins/Alarms/src/alarm_win.cpp12
-rw-r--r--plugins/Alarms/src/frame.cpp8
-rw-r--r--plugins/AssocMgr/src/test.cpp4
-rw-r--r--plugins/BASS_interface/src/Main.cpp4
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/Common.h2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp54
-rw-r--r--plugins/CmdLine/MimCmd/src/commands.cpp2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp6
-rw-r--r--plugins/CmdLine/src/utils.cpp2
-rw-r--r--plugins/ContactsPlus/src/utils.cpp2
-rw-r--r--plugins/CrashDumper/src/upload.cpp2
-rw-r--r--plugins/CyrTranslit/src/TransliterationProtocol.cpp2
-rw-r--r--plugins/Db3x_mmap/src/database.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbmodulechain.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbsettings.cpp4
-rw-r--r--plugins/DbEditorPP/src/addeditsettingsdlg.cpp2
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp8
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp4
-rw-r--r--plugins/DbEditorPP/src/watchedvars.cpp2
-rw-r--r--plugins/Dropbox/src/dropbox_transfers.cpp2
-rw-r--r--plugins/Exchange/src/MirandaExchange.cpp2
-rw-r--r--plugins/FTPFileYM/src/dbentry.cpp6
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp2
-rw-r--r--plugins/FTPFileYM/src/job_upload.cpp2
-rw-r--r--plugins/FTPFileYM/src/mir_db.cpp2
-rw-r--r--plugins/FTPFileYM/src/utils.cpp6
-rw-r--r--plugins/HTTPServer/src/FileShareNode.cpp6
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp10
-rw-r--r--plugins/HTTPServer/src/HttpUser.cpp6
-rw-r--r--plugins/HTTPServer/src/IndexHTML.cpp8
-rw-r--r--plugins/HTTPServer/src/IndexXML.cpp8
-rw-r--r--plugins/HTTPServer/src/MimeHandling.cpp6
-rw-r--r--plugins/HTTPServer/src/main.cpp10
-rw-r--r--plugins/IEView/src/Options.cpp38
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/TabSRMMHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp4
-rw-r--r--plugins/Import/src/import.cpp2
-rw-r--r--plugins/KeyboardNotify/src/main.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MirOTR/src/svcs_proto.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Common.h2
-rwxr-xr-xplugins/New_GPG/src/main.cpp28
-rwxr-xr-xplugins/New_GPG/src/messages.cpp10
-rwxr-xr-xplugins/New_GPG/src/options.cpp10
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp12
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp16
-rw-r--r--plugins/Non-IM Contact/src/files.cpp6
-rw-r--r--plugins/Non-IM Contact/src/main.cpp2
-rw-r--r--plugins/Non-IM Contact/src/namereplacing.cpp12
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp2
-rw-r--r--plugins/NotifyAnything/src/main.cpp2
-rw-r--r--plugins/Popup/src/font.h2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp10
-rw-r--r--plugins/Scriver/src/msglog.cpp8
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp4
-rw-r--r--plugins/SecureIM/src/mmi.cpp6
-rw-r--r--plugins/SecureIM/src/options.cpp2
-rw-r--r--plugins/SecureIM/src/splitmsg.cpp2
-rw-r--r--plugins/SecureIM/src/svcs_proto.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/mir_string.cpp2
-rw-r--r--plugins/Sessions/Src/Utils.cpp4
-rw-r--r--plugins/SmileyAdd/src/download.cpp2
-rw-r--r--plugins/Spamotron/src/bayes.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp2
-rw-r--r--plugins/Spamotron/src/utils.cpp2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp8
-rw-r--r--plugins/TipperYM/src/options.cpp4
-rw-r--r--plugins/TipperYM/src/tipper.cpp36
-rw-r--r--plugins/TopToolBar/src/common.h2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp10
-rw-r--r--plugins/TrafficCounter/src/options.cpp6
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/tinyxml.cpp4
-rw-r--r--plugins/UserInfoEx/src/mir_menuitems.cpp14
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp4
-rwxr-xr-xplugins/Watrack_MPD/src/main.cpp2
-rw-r--r--plugins/Weather/src/weather_data.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp12
-rw-r--r--plugins/WebView/src/main.cpp16
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp2
-rw-r--r--plugins/WhenWasIt/src/utils.cpp6
-rw-r--r--plugins/YAMN/src/mails/mails.cpp2
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp8
-rw-r--r--plugins/YAPP/src/yapp.cpp28
-rw-r--r--plugins/YahooGroups/src/utils.cpp6
-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
-rw-r--r--src/core/stdfile/src/file.cpp4
-rw-r--r--src/core/stdmsg/src/msglog.cpp8
-rw-r--r--src/modules/chat/log.cpp2
-rw-r--r--src/modules/clist/contacts.cpp4
-rw-r--r--src/modules/database/mdatabasecache.cpp8
-rw-r--r--src/modules/netlib/netlibhttp.cpp2
-rw-r--r--src/modules/protocols/protodir.cpp2
-rw-r--r--src/modules/utils/path.cpp2
-rw-r--r--src/modules/xml/xmlParser.cpp4
187 files changed, 728 insertions, 728 deletions
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 2760420853..e7e19cab09 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -844,7 +844,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM)
if (!mir_strcmp(g_MyAvatars[i].szProtoname, proto)) {
LPVOID lpParam = (void *)malloc(mir_strlen(g_MyAvatars[i].szProtoname) + 2);
- strcpy((char *)lpParam, g_MyAvatars[i].szProtoname);
+ mir_strcpy((char *)lpParam, g_MyAvatars[i].szProtoname);
mir_forkthread(ReloadMyAvatar, lpParam);
return 0;
}
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp
index 092911db54..c271880119 100644
--- a/plugins/Alarms/src/alarm_win.cpp
+++ b/plugins/Alarms/src/alarm_win.cpp
@@ -366,8 +366,8 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
title_font_id.cbSize = sizeof(FontIDT);
_tcscpy(title_font_id.group, LPGENT("Alarms"));
_tcscpy(title_font_id.name, LPGENT("Title"));
- strcpy(title_font_id.dbSettingsGroup, MODULE);
- strcpy(title_font_id.prefix, "FontTitle");
+ mir_strcpy(title_font_id.dbSettingsGroup, MODULE);
+ mir_strcpy(title_font_id.prefix, "FontTitle");
_tcscpy(title_font_id.backgroundGroup,LPGENT("Alarms"));
_tcscpy(title_font_id.backgroundName,LPGENT("Background"));
title_font_id.flags = 0;
@@ -377,8 +377,8 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
window_font_id.cbSize = sizeof(FontIDT);
_tcscpy(window_font_id.group, LPGENT("Alarms"));
_tcscpy(window_font_id.name, LPGENT("Window"));
- strcpy(window_font_id.dbSettingsGroup, MODULE);
- strcpy(window_font_id.prefix, "FontWindow");
+ mir_strcpy(window_font_id.dbSettingsGroup, MODULE);
+ mir_strcpy(window_font_id.prefix, "FontWindow");
_tcscpy(window_font_id.backgroundGroup,LPGENT("Alarms"));
_tcscpy(window_font_id.backgroundName,LPGENT("Background"));
window_font_id.flags = 0;
@@ -386,10 +386,10 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
FontRegisterT(&window_font_id);
bk_colour_id.cbSize = sizeof(ColourIDT);
- strcpy(bk_colour_id.dbSettingsGroup, MODULE);
+ mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
_tcscpy(bk_colour_id.group, LPGENT("Alarms"));
_tcscpy(bk_colour_id.name, LPGENT("Background"));
- strcpy(bk_colour_id.setting, "BkColour");
+ mir_strcpy(bk_colour_id.setting, "BkColour");
bk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
bk_colour_id.flags = 0;
bk_colour_id.order = 0;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index a24f04d765..a9b0abba93 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -590,10 +590,10 @@ int CreateFrame()
FontRegister(&font_id);
framebk_colour_id.cbSize = sizeof(ColourID);
- strcpy(framebk_colour_id.dbSettingsGroup, MODULE);
- strcpy(framebk_colour_id.group, LPGEN("Frames"));
- strcpy(framebk_colour_id.name, LPGEN("Alarm reminders"));
- strcpy(framebk_colour_id.setting, "clFrameBack");
+ mir_strcpy(framebk_colour_id.dbSettingsGroup, MODULE);
+ mir_strcpy(framebk_colour_id.group, LPGEN("Frames"));
+ mir_strcpy(framebk_colour_id.name, LPGEN("Alarm reminders"));
+ mir_strcpy(framebk_colour_id.setting, "clFrameBack");
framebk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
framebk_colour_id.flags = 0;
framebk_colour_id.order = 0;
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp
index f5c404fcc1..0163adee36 100644
--- a/plugins/AssocMgr/src/test.cpp
+++ b/plugins/AssocMgr/src/test.cpp
@@ -367,7 +367,7 @@ static int IcqFilesModulesLoaded(WPARAM wParam,LPARAM lParam)
char szService[MAX_PATH+32];
UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(lParam);
- strcat(strcpy(szService,gpszICQProtoName),"OpenFile");
+ strcat(mir_strcpy(szService,gpszICQProtoName),"OpenFile");
/* .icq files are not used, just by the ProtoLink plugin */
//AssocMgr_AddNewFileTypeT(".icq","application/x-icq",TranslateT("ICQ link shortcut"),TranslateT("&Add to contact list..."),hInst,IDI_ICQ,szService,FTDF_BROWSERAUTOOPEN|FTDF_ISTEXT|FTDF_ISSHORTCUT|FTDF_DEFAULTDISABLED);
AssocMgr_AddNewFileTypeT(".uin","application/x-icq",TranslateT("ICQ link shortcut"),TranslateT("&Add to contact list..."),hInst,IDI_ICQ,szService,FTDF_BROWSERAUTOOPEN|FTDF_ISTEXT|FTDF_ISSHORTCUT);
@@ -377,7 +377,7 @@ static int IcqFilesModulesLoaded(WPARAM wParam,LPARAM lParam)
void InitIcqFiles(void)
{
char szService[MAX_PATH+32];
- strcat(strcpy(szService,gpszICQProtoName),"OpenFile");
+ strcat(mir_strcpy(szService,gpszICQProtoName),"OpenFile");
hServiceOpenFile=CreateServiceFunction(szService,IcqOpenFile);
hHookModulesLoaded=HookEvent(ME_SYSTEM_MODULESLOADED,IcqFilesModulesLoaded);
}
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index d15a16a7a0..11f30f6fa8 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -474,8 +474,8 @@ void CreateFrame()
ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(ColourIDT);
- strcpy(colourid.dbSettingsGroup, ModuleName);
- strcpy(colourid.setting, "ColorFrame");
+ mir_strcpy(colourid.dbSettingsGroup, ModuleName);
+ mir_strcpy(colourid.setting, "ColorFrame");
_tcscpy(colourid.name, LPGENT("Frame background"));
_tcscpy(colourid.group, _T(ModuleName));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index a9c123cfa2..0e6a1eadf5 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -76,7 +76,7 @@ void RegPopupActions()
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
poOptions.paActions[0].cbSize = sizeof(POPUPACTION);
- strcpy(poOptions.paActions[0].lpzTitle, ModuleName);
+ mir_strcpy(poOptions.paActions[0].lpzTitle, ModuleName);
strcat(poOptions.paActions[0].lpzTitle, "/Copy to clipboard");
poOptions.paActions[0].flags = PAF_ENABLED;
poOptions.paActions[0].wParam = poOptions.paActions[0].lParam = 0;
diff --git a/plugins/ClientChangeNotify/src/Common.h b/plugins/ClientChangeNotify/src/Common.h
index c5c337fe86..830ba2cff0 100644
--- a/plugins/ClientChangeNotify/src/Common.h
+++ b/plugins/ClientChangeNotify/src/Common.h
@@ -115,7 +115,7 @@ static __inline CString LogMessage(const char *Format, ...)
{
va_list va;
char szText[8096];
- strcpy(szText, LOG_PREFIX);
+ mir_strcpy(szText, LOG_PREFIX);
va_start(va, Format);
mir_vsnprintf(szText + (lengthof(LOG_PREFIX) - 1), sizeof(szText) - (lengthof(LOG_PREFIX) - 1), Format, va);
va_end(va);
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index f31e7df82f..a29c3d8673 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -403,7 +403,7 @@ void GetBorderSize(HWND hwnd, RECT *rect)
char __forceinline *AS(char *str, const char *setting, char *addstr)
{
if (str != NULL) {
- strcpy(str, setting);
+ mir_strcpy(str, setting);
strcat(str, addstr);
}
return str;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index d85939a0a0..1d610cd65d 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -418,7 +418,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry)
if (cEntry->status_item == NULL)
cEntry->status_item = reinterpret_cast<StatusItems_t *>(malloc(sizeof(StatusItems_t)));
memset(cEntry->status_item, 0, sizeof(StatusItems_t));
- strcpy(cEntry->status_item->szName, "{--CONTACT--}"); // mark as "per contact" item
+ mir_strcpy(cEntry->status_item->szName, "{--CONTACT--}"); // mark as "per contact" item
cEntry->status_item->IGNORED = 0;
cEntry->status_item->TEXTCOLOR = cfg::getDword(hContact, "EXTBK", "TEXT", RGB(20, 20, 20));
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 9177354ca3..6466404b47 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -304,19 +304,19 @@ void LoadExtBkSettingsFromDB()
p->imageItem = 0;
char buffer[255], *pszEnd = buffer + mir_snprintf(buffer, SIZEOF(buffer), "%s_", p->szDBname);
- strcpy(pszEnd, "IGNORE"); p->IGNORED = (BYTE)cfg::getByte("CLCExt", buffer, p->IGNORED);
- strcpy(pszEnd, "GRADIENT"); p->GRADIENT = (BYTE)cfg::getDword("CLCExt", buffer, p->GRADIENT);
- strcpy(pszEnd, "CORNER"); p->CORNER = (BYTE)cfg::getDword("CLCExt", buffer, p->CORNER);
- strcpy(pszEnd, "COLOR"); p->COLOR = cfg::getDword("CLCExt", buffer, p->COLOR);
- strcpy(pszEnd, "COLOR2"); p->COLOR2 = cfg::getDword(NULL, "CLCExt", buffer, p->COLOR2);
- strcpy(pszEnd, "COLOR2_TRANSPARENT"); p->COLOR2_TRANSPARENT = (BYTE)cfg::getByte("CLCExt", buffer, p->COLOR2_TRANSPARENT);
- strcpy(pszEnd, "TEXTCOLOR"); p->TEXTCOLOR = cfg::getDword("CLCExt", buffer, p->TEXTCOLOR);
- strcpy(pszEnd, "ALPHA"); p->ALPHA = cfg::getByte("CLCExt", buffer, p->ALPHA);
- strcpy(pszEnd, "MRGN_LEFT"); p->MARGIN_LEFT = cfg::getByte("CLCExt", buffer, p->MARGIN_LEFT);
- strcpy(pszEnd, "MRGN_TOP"); p->MARGIN_TOP = cfg::getByte("CLCExt", buffer, p->MARGIN_TOP);
- strcpy(pszEnd, "MRGN_RIGHT"); p->MARGIN_RIGHT = cfg::getByte("CLCExt", buffer, p->MARGIN_RIGHT);
- strcpy(pszEnd, "MRGN_BOTTOM"); p->MARGIN_BOTTOM = cfg::getByte("CLCExt", buffer, p->MARGIN_BOTTOM);
- strcpy(pszEnd, "BDRSTYLE"); p->BORDERSTYLE = cfg::getDword("CLCExt", buffer, p->BORDERSTYLE);
+ mir_strcpy(pszEnd, "IGNORE"); p->IGNORED = (BYTE)cfg::getByte("CLCExt", buffer, p->IGNORED);
+ mir_strcpy(pszEnd, "GRADIENT"); p->GRADIENT = (BYTE)cfg::getDword("CLCExt", buffer, p->GRADIENT);
+ mir_strcpy(pszEnd, "CORNER"); p->CORNER = (BYTE)cfg::getDword("CLCExt", buffer, p->CORNER);
+ mir_strcpy(pszEnd, "COLOR"); p->COLOR = cfg::getDword("CLCExt", buffer, p->COLOR);
+ mir_strcpy(pszEnd, "COLOR2"); p->COLOR2 = cfg::getDword(NULL, "CLCExt", buffer, p->COLOR2);
+ mir_strcpy(pszEnd, "COLOR2_TRANSPARENT"); p->COLOR2_TRANSPARENT = (BYTE)cfg::getByte("CLCExt", buffer, p->COLOR2_TRANSPARENT);
+ mir_strcpy(pszEnd, "TEXTCOLOR"); p->TEXTCOLOR = cfg::getDword("CLCExt", buffer, p->TEXTCOLOR);
+ mir_strcpy(pszEnd, "ALPHA"); p->ALPHA = cfg::getByte("CLCExt", buffer, p->ALPHA);
+ mir_strcpy(pszEnd, "MRGN_LEFT"); p->MARGIN_LEFT = cfg::getByte("CLCExt", buffer, p->MARGIN_LEFT);
+ mir_strcpy(pszEnd, "MRGN_TOP"); p->MARGIN_TOP = cfg::getByte("CLCExt", buffer, p->MARGIN_TOP);
+ mir_strcpy(pszEnd, "MRGN_RIGHT"); p->MARGIN_RIGHT = cfg::getByte("CLCExt", buffer, p->MARGIN_RIGHT);
+ mir_strcpy(pszEnd, "MRGN_BOTTOM"); p->MARGIN_BOTTOM = cfg::getByte("CLCExt", buffer, p->MARGIN_BOTTOM);
+ mir_strcpy(pszEnd, "BDRSTYLE"); p->BORDERSTYLE = cfg::getDword("CLCExt", buffer, p->BORDERSTYLE);
}
if (cfg::dat.bFirstRun) {
@@ -471,19 +471,19 @@ void extbk_export(char *file)
continue;
char *pszEnd = buffer + mir_snprintf(buffer, SIZEOF(buffer), "%s_", p->szDBname);
- strcpy(pszEnd, "ALPHA"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->ALPHA), sizeof(p->ALPHA), file);
- strcpy(pszEnd, "COLOR"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR), sizeof(p->COLOR), file);
- strcpy(pszEnd, "COLOR2"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR2), sizeof(p->COLOR2), file);
- strcpy(pszEnd, "COLOR2_TRANSPARENT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR2_TRANSPARENT), sizeof(p->COLOR2_TRANSPARENT), file);
- strcpy(pszEnd, "TEXTCOLOR"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->TEXTCOLOR), sizeof(p->TEXTCOLOR), file);
- strcpy(pszEnd, "CORNER"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->CORNER), sizeof(p->CORNER), file);
- strcpy(pszEnd, "GRADIENT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->GRADIENT), sizeof(p->GRADIENT), file);
- strcpy(pszEnd, "IGNORED"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->IGNORED), sizeof(p->IGNORED), file);
- strcpy(pszEnd, "MARGIN_BOTTOM"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_BOTTOM), sizeof(p->MARGIN_BOTTOM), file);
- strcpy(pszEnd, "MARGIN_LEFT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_LEFT), sizeof(p->MARGIN_LEFT), file);
- strcpy(pszEnd, "MARGIN_RIGHT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_RIGHT), sizeof(p->MARGIN_RIGHT), file);
- strcpy(pszEnd, "MARGIN_TOP"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_TOP), sizeof(p->MARGIN_TOP), file);
- strcpy(pszEnd, "BORDERSTYLE"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->BORDERSTYLE), sizeof(p->BORDERSTYLE), file);
+ mir_strcpy(pszEnd, "ALPHA"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->ALPHA), sizeof(p->ALPHA), file);
+ mir_strcpy(pszEnd, "COLOR"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR), sizeof(p->COLOR), file);
+ mir_strcpy(pszEnd, "COLOR2"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR2), sizeof(p->COLOR2), file);
+ mir_strcpy(pszEnd, "COLOR2_TRANSPARENT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->COLOR2_TRANSPARENT), sizeof(p->COLOR2_TRANSPARENT), file);
+ mir_strcpy(pszEnd, "TEXTCOLOR"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->TEXTCOLOR), sizeof(p->TEXTCOLOR), file);
+ mir_strcpy(pszEnd, "CORNER"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->CORNER), sizeof(p->CORNER), file);
+ mir_strcpy(pszEnd, "GRADIENT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->GRADIENT), sizeof(p->GRADIENT), file);
+ mir_strcpy(pszEnd, "IGNORED"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->IGNORED), sizeof(p->IGNORED), file);
+ mir_strcpy(pszEnd, "MARGIN_BOTTOM"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_BOTTOM), sizeof(p->MARGIN_BOTTOM), file);
+ mir_strcpy(pszEnd, "MARGIN_LEFT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_LEFT), sizeof(p->MARGIN_LEFT), file);
+ mir_strcpy(pszEnd, "MARGIN_RIGHT"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_RIGHT), sizeof(p->MARGIN_RIGHT), file);
+ mir_strcpy(pszEnd, "MARGIN_TOP"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->MARGIN_TOP), sizeof(p->MARGIN_TOP), file);
+ mir_strcpy(pszEnd, "BORDERSTYLE"); WritePrivateProfileStructA("ExtBKSettings", buffer, &(p->BORDERSTYLE), sizeof(p->BORDERSTYLE), file);
}
for (n = 0; n <= FONTID_LAST; n++) {
@@ -1067,7 +1067,7 @@ static void BTN_ReadItem(char *itemName, char *file)
char szKey[20];
BYTE *pValue;
- strcpy(szKey, n == 0 ? "dbonpush" : "dbonrelease");
+ mir_strcpy(szKey, n == 0 ? "dbonpush" : "dbonrelease");
pValue = (n == 0 ? tmpItem.bValuePush : tmpItem.bValueRelease);
GetPrivateProfileStringA(itemName, szKey, "None", szBuffer, 1000, file);
diff --git a/plugins/CmdLine/MimCmd/src/commands.cpp b/plugins/CmdLine/MimCmd/src/commands.cpp
index 44033eef7c..3983aebdd2 100644
--- a/plugins/CmdLine/MimCmd/src/commands.cpp
+++ b/plugins/CmdLine/MimCmd/src/commands.cpp
@@ -208,7 +208,7 @@ void ProcessConsoleCommand(PCommand command, char *arguments[], int count, PRepl
case WAIT_OBJECT_0 + 1: //close event
default:
{
- strcpy(sdCmdLine->reply.message, Translate("Miranda has been closed or an error has occurred while waiting for the result, could not process request."));
+ mir_strcpy(sdCmdLine->reply.message, Translate("Miranda has been closed or an error has occurred while waiting for the result, could not process request."));
done = TRUE;
break;
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index cb3d27d15b..70310a08b3 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -1544,7 +1544,7 @@ void AddHistoryEvent(DBEVENTINFO *dbEvent, char *contact, PReply reply)
SetEvent(heServerBufferFull);
Sleep(750);
- strcpy(reply->message, "\n");
+ mir_strcpy(reply->message, "\n");
}
mir_free(message);
}
@@ -1739,8 +1739,8 @@ void HandleSetNicknameCommand(PCommand command, TArgument *argv, int argc, PRepl
if (argc == 4)
{
char protocol[512], nickname[512];
- strcpy(protocol, argv[2]);
- strcpy(nickname, argv[3]);
+ mir_strcpy(protocol, argv[2]);
+ mir_strcpy(nickname, argv[3]);
int res = CallProtoService(protocol, PS_SETMYNICKNAME, SMNN_TCHAR, (LPARAM) nickname);
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index c6fdf3c5d1..7dd7d8477b 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -107,7 +107,7 @@ char *BinToHex(int size, PBYTE data)
void HexToBin(char *inData, ULONG &size, LPBYTE &outData)
{
char buffer[32] = {0};
- strcpy(buffer, "0x");
+ mir_strcpy(buffer, "0x");
STRNCPY(buffer + 2, inData, HEX_SIZE);
sscanf(buffer, "%x", &size);
outData = (unsigned char*)new char[size*2];
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp
index 3326da9404..475879861e 100644
--- a/plugins/ContactsPlus/src/utils.cpp
+++ b/plugins/ContactsPlus/src/utils.cpp
@@ -44,7 +44,7 @@ void __fastcall strcpynull(char *str1, const char *str2)
if (!str2)
str2 = "";
- strcpy(str1, str2);
+ mir_strcpy(str1, str2);
}
char* __fastcall null_strdup(const char *string)
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp
index f375447bab..7e331f37ce 100644
--- a/plugins/CrashDumper/src/upload.cpp
+++ b/plugins/CrashDumper/src/upload.cpp
@@ -171,7 +171,7 @@ bool InternetDownloadFile(const char *szUrl, VerTrnsfr* szReq)
rlen + mir_strlen(nlhrReply->headers[i].szValue) * 3 + 1);
strncpy(szRedirUrl, szUrl, rlen);
- strcpy(szRedirUrl + rlen, nlhrReply->headers[i].szValue);
+ mir_strcpy(szRedirUrl + rlen, nlhrReply->headers[i].szValue);
nlhr.szUrl = szRedirUrl;
break;
diff --git a/plugins/CyrTranslit/src/TransliterationProtocol.cpp b/plugins/CyrTranslit/src/TransliterationProtocol.cpp
index ebb544ffd1..f49359cb36 100644
--- a/plugins/CyrTranslit/src/TransliterationProtocol.cpp
+++ b/plugins/CyrTranslit/src/TransliterationProtocol.cpp
@@ -52,7 +52,7 @@ void TransliterationProtocol::TranslateMessageUTF(WPARAM, LPARAM lParam)
mir_free(txtUTFencoded);
ccs->lParam = reinterpret_cast<LPARAM>(mir_alloc(txtUTF.length()));
- strcpy(reinterpret_cast<char*>(ccs->lParam), txtUTF.c_str());
+ mir_strcpy(reinterpret_cast<char*>(ccs->lParam), txtUTF.c_str());
}
//------------------------------------------------------------------------------
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp
index f4f7da1bdd..aa28878fad 100644
--- a/plugins/Db3x_mmap/src/database.cpp
+++ b/plugins/Db3x_mmap/src/database.cpp
@@ -133,7 +133,7 @@ char* printVariant(DBVARIANT* p)
case DBVT_DWORD: mir_snprintf(boo, SIZEOF(boo), "dword: %d", p->dVal ); break;
case DBVT_UTF8:
case DBVT_ASCIIZ: mir_snprintf(boo, SIZEOF(boo), "string: '%s'", p->pszVal); break;
- case DBVT_DELETED: strcpy(boo, "deleted"); break;
+ case DBVT_DELETED: mir_strcpy(boo, "deleted"); break;
default: mir_snprintf(boo, SIZEOF(boo), "crap: %d", p->type ); break;
}
return boo;
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp
index 6b2731747b..4f590f1b2e 100644
--- a/plugins/Db3x_mmap/src/dbmodulechain.cpp
+++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp
@@ -103,7 +103,7 @@ DWORD CDb3Mmap::GetModuleNameOfs(const char *szName)
// add to cache
char *mod = (char*)HeapAlloc(m_hModHeap, 0, nameLen + 1);
- strcpy(mod, szName);
+ mir_strcpy(mod, szName);
AddToList(mod, ofsNew);
// quit
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp
index 4abaf4d7aa..ac1f956b68 100644
--- a/plugins/Db3x_mmap/src/dbsettings.cpp
+++ b/plugins/Db3x_mmap/src/dbsettings.cpp
@@ -104,7 +104,7 @@ LBL_Seek:
}
else {
dbv->pszVal = (char*)mir_alloc(mir_strlen(pCachedValue->pszVal) + 1);
- strcpy(dbv->pszVal, pCachedValue->pszVal);
+ mir_strcpy(dbv->pszVal, pCachedValue->pszVal);
}
}
else memcpy(dbv, pCachedValue, sizeof(DBVARIANT));
@@ -409,7 +409,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSetting(MCONTACT contactID, DBCONTACTW
return 1;
dbcwNotif.value.pszVal = (char*)alloca(mir_strlen(val) + 1);
- strcpy(dbcwNotif.value.pszVal, val);
+ mir_strcpy(dbcwNotif.value.pszVal, val);
mir_free(val);
dbcwNotif.value.type = DBVT_UTF8;
}
diff --git a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
index 5eff743b33..95f7f6dda1 100644
--- a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
+++ b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
@@ -352,7 +352,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (IsWindowVisible(GetDlgItem(hwnd, IDC_STRING)) || (saveAsType(hwnd) == 3))
memcpy(value, "\0\0", 2);
else
- strcpy(value, "0");
+ mir_strcpy(value, "0");
// delete the old setting
if (mir_strcmp(setting, dbsetting->setting) && dbsetting->setting && (dbsetting->setting)[0] != 0)
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index 7f594a4eb5..8618de7a97 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -348,20 +348,20 @@ void importSettings(MCONTACT hContact, char *importstring)
else if (importstring[i] == '[' && !strchr(&importstring[i + 1], '=')) { // get the module
if (end = strpbrk(&importstring[i + 1], "]")) {
*end = '\0';
- strcpy(module, &importstring[i + 1]);
+ mir_strcpy(module, &importstring[i + 1]);
}
}
else if (importstring[i] == '-' && importstring[i + 1] == '[' && !strchr(&importstring[i + 2], '=')) { // get the module
if (end = strpbrk(&importstring[i + 2], "]")) {
*end = '\0';
- strcpy(module, &importstring[i + 2]);
+ mir_strcpy(module, &importstring[i + 2]);
deleteModule(module, hContact, 1);
}
}
else if (strstr(&importstring[i], "=") && module[0]) { // get the setting
if (end = strpbrk(&importstring[i + 1], "=")) {
*end = '\0';
- strcpy(setting, &importstring[i]);
+ mir_strcpy(setting, &importstring[i]);
// get the type
type = *(end + 1);
@@ -563,7 +563,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath)
}
while (szFileNames[index]) {
- strcpy(szFile, szPath);
+ mir_strcpy(szFile, szPath);
strcat(szFile, &szFileNames[index]);
index += (int)mir_strlen(&szFileNames[index]) + 1;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 6b23e41586..cd27631faa 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -566,8 +566,8 @@ void EditLabel(HWND hwnd2List, int item, int subitem)
}
data->hContact = info->hContact;
- strcpy(data->module, info->module);
- strcpy(data->setting, setting);
+ mir_strcpy(data->module, info->module);
+ mir_strcpy(data->setting, setting);
data->item = item;
data->subitem = subitem;
data->hwnd = hwnd2List;
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp
index edcf5f4a30..44c2f801a4 100644
--- a/plugins/DbEditorPP/src/watchedvars.cpp
+++ b/plugins/DbEditorPP/src/watchedvars.cpp
@@ -299,7 +299,7 @@ void popupWatchedVar(MCONTACT hContact, const char* module, const char* setting)
else
mir_snprintf(lpzContactName, SIZEOF(lpzContactName), nick_unknown);
}
- else strcpy(lpzContactName, Translate("Settings"));
+ else mir_strcpy(lpzContactName, Translate("Settings"));
// 2nd line
DBVARIANT dbv;
diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp
index 40aa523691..9fce0e6b01 100644
--- a/plugins/Dropbox/src/dropbox_transfers.cpp
+++ b/plugins/Dropbox/src/dropbox_transfers.cpp
@@ -19,7 +19,7 @@ void CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId
if (root)
{
JSONNODE *node = json_get(root, "upload_id");
- strcpy(uploadId, mir_u2a(json_as_string(node)));
+ mir_strcpy(uploadId, mir_u2a(json_as_string(node)));
node = json_get(root, "offset");
offset = json_as_int(node);
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp
index 2026967762..e1b9a8163b 100644
--- a/plugins/Exchange/src/MirandaExchange.cpp
+++ b/plugins/Exchange/src/MirandaExchange.cpp
@@ -133,7 +133,7 @@ CKeeper::CKeeper( LPTSTR szSender, LPTSTR szSubject, LPSTR szEntryID)
m_nSizeEntryID = (UINT)mir_strlen( szEntryID ) +1;
m_szEntryID = new char[m_nSizeEntryID];
memset(m_szEntryID, 0, m_nSizeEntryID * sizeof(char));
- strcpy(m_szEntryID, szEntryID );
+ mir_strcpy(m_szEntryID, szEntryID );
}
}
diff --git a/plugins/FTPFileYM/src/dbentry.cpp b/plugins/FTPFileYM/src/dbentry.cpp
index 4d23aa323b..b389c40430 100644
--- a/plugins/FTPFileYM/src/dbentry.cpp
+++ b/plugins/FTPFileYM/src/dbentry.cpp
@@ -28,7 +28,7 @@ DBEntry::DBEntry(DBEntry *entry)
{
this->fileID = entry->fileID;
this->iFtpNum = entry->iFtpNum;
- strcpy(this->szFileName, entry->szFileName);
+ mir_strcpy(this->szFileName, entry->szFileName);
}
DBEntry *DBEntry::getFirts()
@@ -52,7 +52,7 @@ DBEntry *DBEntry::getNext(DBEntry *entry)
{
entry->fileID = entryID;
entry->iFtpNum = ftpNum;
- strcpy(entry->szFileName, szValue);
+ mir_strcpy(entry->szFileName, szValue);
entry->deleteTS = DB::getDwordF(0, MODULE_FILES, "DeleteTS%d", entryID, 0);
entryID++;
return entry;
@@ -95,7 +95,7 @@ DBEntry *DBEntry::get(int fileID)
{
entry->fileID = fileID;
entry->iFtpNum = ftpNum;
- strcpy(entry->szFileName, szValue);
+ mir_strcpy(entry->szFileName, szValue);
entry->deleteTS = DB::getDwordF(0, MODULE_FILES, "DeleteTS%d", fileID, 0);
return entry;
}
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp
index eac1b16c21..f567f15610 100644
--- a/plugins/FTPFileYM/src/job_generic.cpp
+++ b/plugins/FTPFileYM/src/job_generic.cpp
@@ -34,7 +34,7 @@ GenericJob::GenericJob(GenericJob *job)
{
_tcscpy(this->stzFilePath, job->stzFilePath);
_tcscpy(this->stzFileName, job->stzFileName);
- strcpy(this->szSafeFileName, job->szSafeFileName);
+ mir_strcpy(this->szSafeFileName, job->szSafeFileName);
}
GenericJob::~GenericJob()
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp
index d1ec1aba1f..5369763b60 100644
--- a/plugins/FTPFileYM/src/job_upload.cpp
+++ b/plugins/FTPFileYM/src/job_upload.cpp
@@ -34,7 +34,7 @@ UploadJob::UploadJob(MCONTACT _hContact, int _iFtpNum, EMode _mode) :
UploadJob::UploadJob(UploadJob *job) :
GenericJob(job),fp(NULL),uiSent(0),uiTotalSent(0),uiFileSize(0)
{
- strcpy(this->szFileLink, job->szFileLink);
+ mir_strcpy(this->szFileLink, job->szFileLink);
for (int i = 0; i < SIZEOF(this->lastSpeed); i++)
this->lastSpeed[i] = 0;
}
diff --git a/plugins/FTPFileYM/src/mir_db.cpp b/plugins/FTPFileYM/src/mir_db.cpp
index 79057d2aab..82a8306ee7 100644
--- a/plugins/FTPFileYM/src/mir_db.cpp
+++ b/plugins/FTPFileYM/src/mir_db.cpp
@@ -79,7 +79,7 @@ int DB::getAString(MCONTACT hContact, char *szModule, char *szSetting, char *buf
DBVARIANT dbv;
if (!db_get_s(hContact, szModule, szSetting, &dbv))
{
- strcpy(buff, dbv.pszVal);
+ mir_strcpy(buff, dbv.pszVal);
db_free(&dbv);
return 0;
}
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp
index ddecc51625..02c5ecddb7 100644
--- a/plugins/FTPFileYM/src/utils.cpp
+++ b/plugins/FTPFileYM/src/utils.cpp
@@ -81,7 +81,7 @@ void Utils::copyToClipboard(char *szText)
EmptyClipboard();
HGLOBAL hClipboardData = GlobalAlloc(GMEM_DDESHARE, 1024);
char *pchData = (char *)GlobalLock(hClipboardData);
- strcpy(pchData, szText);
+ mir_strcpy(pchData, szText);
GlobalUnlock(hClipboardData);
SetClipboardData(CF_TEXT, hClipboardData);
CloseClipboard();
@@ -109,7 +109,7 @@ char* Utils::makeSafeString(TCHAR *input, char *output)
}
}
- strcpy(output, buff);
+ mir_strcpy(output, buff);
FREE(buff);
return output;
@@ -218,7 +218,7 @@ bool Utils::setFileNameDlgA(char *nameBuff)
if (res)
{
char *p = mir_t2a(buff);
- strcpy(nameBuff, p);
+ mir_strcpy(nameBuff, p);
FREE(p);
}
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp
index a9675f49cf..a0307cad11 100644
--- a/plugins/HTTPServer/src/FileShareNode.cpp
+++ b/plugins/HTTPServer/src/FileShareNode.cpp
@@ -209,7 +209,7 @@ bool CLFileShareNode::bSetPaths(char * pszSrvPath, char * pszRealPath) {
st.dwMaxSrvPath = (int)mir_strlen(pszSrvPath) + 1;
st.pszSrvPath = new char[ st.dwMaxSrvPath ];
- strcpy(st.pszSrvPath, pszSrvPath);
+ mir_strcpy(st.pszSrvPath, pszSrvPath);
int nRealLen = (int)mir_strlen(pszRealPath);
if (nRealLen <= 2 || !(pszRealPath[1] == ':' ||
@@ -218,14 +218,14 @@ bool CLFileShareNode::bSetPaths(char * pszSrvPath, char * pszRealPath) {
// we will prepend plugin path to avoid problems
st.dwMaxRealPath = nPluginPathLen + nRealLen + 1;
st.pszRealPath = new char[ st.dwMaxRealPath ];
- strcpy(st.pszRealPath, szPluginPath);
+ mir_strcpy(st.pszRealPath, szPluginPath);
pszOrigRealPath = &st.pszRealPath[nPluginPathLen];
} else {
st.dwMaxRealPath = nRealLen + 1;
st.pszRealPath = new char[ st.dwMaxRealPath ];
pszOrigRealPath = st.pszRealPath;
}
- strcpy(pszOrigRealPath, pszRealPath);
+ mir_strcpy(pszOrigRealPath, pszRealPath);
return true;
}
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 0af77ce591..d936a59018 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -300,7 +300,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook(
} else {
// a directory was selected
pNotify->lpOFN->Flags &= ~OFN_FILEMUSTEXIST;
- strcpy(pNotify->lpOFN->lpstrFile, pszShareDirStr);
+ mir_strcpy(pNotify->lpOFN->lpstrFile, pszShareDirStr);
CommDlg_OpenSave_SetControlText(hWndFileDlg, edt1, pszShareDirStr);
EnableWindow(hFileName, FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_MAX_DOWNLOADS), FALSE);
@@ -341,7 +341,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook(
SetDlgItemText(hDlg, IDC_SHARE_NAME, szSelection);
}
- strcpy(pstShare->pszSrvPath, szSelection);
+ mir_strcpy(pstShare->pszSrvPath, szSelection);
return false;
}
@@ -444,7 +444,7 @@ bool bShowShareNewFileDlg(HWND hwndOwner, STFileShareInfo * pstNewShare) {
char szInitialDir[MAX_PATH];
if (ofn.lpstrFile[mir_strlen(ofn.lpstrFile)-1] == '\\') {
ofn.lpstrInitialDir = szInitialDir;
- strcpy(szInitialDir, ofn.lpstrFile);
+ mir_strcpy(szInitialDir, ofn.lpstrFile);
*ofn.lpstrFile = '\0';
}
@@ -602,7 +602,7 @@ void UpdateStatisticView(HWND hwndDlg, bool bRefressUsersOnly = false) {
if (pclCurUser->dwTotalSize) {
mir_snprintf(szTmp, SIZEOF(szTmp), "%d %%", (pclCurUser->dwCurrentDL * 100) / pclCurUser->dwTotalSize);
} else {
- strcpy(szTmp, "? %%");
+ mir_strcpy(szTmp, "? %%");
}
sItem.iSubItem = 3;
sItem.pszText = szTmp;
@@ -918,7 +918,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara
HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, sLink.size() + 1);
// Lock the handle and copy the text to the buffer.
char * lptstrCopy = (char *)GlobalLock(hglbCopy);
- strcpy(lptstrCopy, sLink.c_str());
+ mir_strcpy(lptstrCopy, sLink.c_str());
GlobalUnlock(hglbCopy);
// Place the handle on the clipboard.
diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp
index c8f111d5c2..e1398215bc 100644
--- a/plugins/HTTPServer/src/HttpUser.cpp
+++ b/plugins/HTTPServer/src/HttpUser.cpp
@@ -472,14 +472,14 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
hFile = CreateFile(szTempfile, GENERIC_READ ,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- strcpy(szRealPath, "a.xml"); // restore .xml for mime type
+ mir_strcpy(szRealPath, "a.xml"); // restore .xml for mime type
} else if ((indexCreationMode == INDEX_CREATION_HTML ||
indexCreationMode == INDEX_CREATION_DETECT) &&
bCreateIndexHTML(pszRealPath, szTempfile, pszSrvPath, dwRemoteIP)) {
hFile = CreateFile(szTempfile, GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- strcpy(szRealPath, "a.html"); // restore .html for mime type
+ mir_strcpy(szRealPath, "a.html"); // restore .html for mime type
} else {
continue;
}
@@ -504,7 +504,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
}
}
- strcpy(this->szCurrentDLSrvPath, pszSrvPath);
+ mir_strcpy(this->szCurrentDLSrvPath, pszSrvPath);
DWORD nDataSize = GetFileSize(hFile, NULL);
dwTotalSize = nDataSize;
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp
index a37ef808db..222e1bca5c 100644
--- a/plugins/HTTPServer/src/IndexHTML.cpp
+++ b/plugins/HTTPServer/src/IndexHTML.cpp
@@ -234,7 +234,7 @@ bool LoadIndexHTMLTemplate() {
//LogEvent("Template", szDestBuf);
szIndexHTMLTemplate = new char[mir_strlen(szDestBuf)+1];
- strcpy(szIndexHTMLTemplate, szDestBuf);
+ mir_strcpy(szIndexHTMLTemplate, szDestBuf);
}
CloseHandle(hFile);
@@ -329,7 +329,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
if (szName[0] == '\0')
- strcpy(szName, "my Miranda Webserver");
+ mir_strcpy(szName, "my Miranda Webserver");
do {
switch (*pszPos) {
@@ -369,8 +369,8 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
}
if (hFind) {
- strcpy(szName, fdFindFileData.cFileName);
- strcpy(szURL, fdFindFileData.cFileName);
+ mir_strcpy(szName, fdFindFileData.cFileName);
+ mir_strcpy(szURL, fdFindFileData.cFileName);
/*char* pszTmp = szURL;
while(pszTmp = strchr(pszTmp, ' '))
*pszTmp = '+';*/
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp
index 11ee766135..782cb289e2 100644
--- a/plugins/HTTPServer/src/IndexXML.cpp
+++ b/plugins/HTTPServer/src/IndexXML.cpp
@@ -35,8 +35,8 @@ static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace,
strncpy(szBuffer, pszSrc, SIZEOF(szBuffer)-1);
do {
- strcpy(szBuffer + (pszSign - pszSrc), pszNew);
- strcpy(szBuffer + (pszSign - pszSrc) + mir_strlen(pszNew), pszSign + 1);
+ mir_strcpy(szBuffer + (pszSign - pszSrc), pszNew);
+ mir_strcpy(szBuffer + (pszSign - pszSrc) + mir_strlen(pszNew), pszSign + 1);
*pszSign = ' ';
} while (pszSign = strchr(pszSrc, pszReplace));
@@ -133,7 +133,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath,
(mir_strcmp(fdFindFileData.cFileName, "..") || mir_strcmp(pszSrvPath, "/"))) { // hide .. in root
pszBuffer = szBuffer;
- strcpy(szFileName, fdFindFileData.cFileName);
+ mir_strcpy(szFileName, fdFindFileData.cFileName);
ReplaceSign(szFileName, MAX_PATH, '&', "&amp;");
if (fdFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
@@ -185,7 +185,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath,
!strncmp(pclCur->st.pszSrvPath, pszSrvPath, mir_strlen(pszSrvPath))) {
pszBuffer = szBuffer;
- strcpy(szFileName, &pclCur->st.pszSrvPath[mir_strlen(pszSrvPath)]);
+ mir_strcpy(szFileName, &pclCur->st.pszSrvPath[mir_strlen(pszSrvPath)]);
ReplaceSign(szFileName, MAX_PATH, '&', "&amp;");
if (pclCur->bIsDirectory()) {
diff --git a/plugins/HTTPServer/src/MimeHandling.cpp b/plugins/HTTPServer/src/MimeHandling.cpp
index 45fead8013..12a45f1946 100644
--- a/plugins/HTTPServer/src/MimeHandling.cpp
+++ b/plugins/HTTPServer/src/MimeHandling.cpp
@@ -15,7 +15,7 @@ int bInitMimeHandling() {
ExtensionListCell *pExtCell = NULL;
char szBuf[10000];
- strcpy(szBuf, szPluginPath);
+ mir_strcpy(szBuf, szPluginPath);
strcat(szBuf, szMimeTypeConfigFile);
mimeDB = fopen(szBuf, "r");
@@ -40,7 +40,7 @@ int bInitMimeHandling() {
/*create and fill a cell*/
pDBCell = (ContentType*)malloc(sizeof(ContentType));
pDBCell->mimeType = (char*)malloc(mir_strlen(tok) + 1);
- strcpy(pDBCell->mimeType, tok);
+ mir_strcpy(pDBCell->mimeType, tok);
pDBCell->extList = NULL;
pDBCell->next = NULL;
/* looking for extensions */
@@ -49,7 +49,7 @@ int bInitMimeHandling() {
/*create and fill a cell*/
pExtCell = (ExtensionListCell*)malloc(sizeof(ExtensionListCell));
pExtCell->ext = (char*)malloc(mir_strlen(tok) + 1);
- strcpy(pExtCell->ext, tok);
+ mir_strcpy(pExtCell->ext, tok);
pExtCell->next = NULL;
/*link*/
if (pDBCell->extList == NULL) {
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index d63307f5f4..5923287f17 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -229,7 +229,7 @@ bool bReadConfigurationFile() {
CLFileShareNode * pclLastNode = NULL;
char szBuf[1000];
- strcpy(szBuf, szPluginPath);
+ mir_strcpy(szBuf, szPluginPath);
strcat(szBuf, szConfigFile);
HANDLE hFile = CreateFile(szBuf, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -329,7 +329,7 @@ bool bReadConfigurationFile() {
bool bWriteConfigurationFile() {
CLFileShareListAccess clCritSection;
char szBuf[1000];
- strcpy(szBuf, szPluginPath);
+ mir_strcpy(szBuf, szPluginPath);
strcat(szBuf, szConfigFile);
HANDLE hFile = CreateFile(szBuf, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
@@ -489,7 +489,7 @@ static INT_PTR nGetShare(WPARAM /*wParam*/, LPARAM lParam) {
if (mir_strcmp(pclCur->st.pszSrvPath, pclShare->pszSrvPath) == 0) {
if (pclShare->dwMaxRealPath <= mir_strlen(pclCur->st.pszRealPath) + 1)
return 1003;
- strcpy(pclShare->pszRealPath, pclCur->st.pszRealPath);
+ mir_strcpy(pclShare->pszRealPath, pclCur->st.pszRealPath);
pclShare->dwAllowedIP = pclCur->st.dwAllowedIP;
pclShare->dwAllowedMask = pclCur->st.dwAllowedMask;
pclShare->nMaxDownloads = pclCur->st.nMaxDownloads;
@@ -728,11 +728,11 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) {
share.pszRealPath = szRealPath;
share.dwMaxRealPath = sizeof(szRealPath);
- strcpy(share.pszRealPath, p[0]);
+ mir_strcpy(share.pszRealPath, p[0]);
share.pszSrvPath = szSrvPath;
share.dwMaxSrvPath = sizeof(szSrvPath);
- strcpy(share.pszSrvPath, p[1]);
+ mir_strcpy(share.pszSrvPath, p[1]);
if (CallService(MS_HTTP_ADD_CHANGE_REMOVE, 0, (LPARAM)&share))
break;
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index bd63b8a9aa..6b183d236b 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -382,7 +382,7 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates)
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE;
tvi.item.stateMask = TVIS_SELECTED | TVIS_STATEIMAGEMASK;
if (i == 0) {
- strcpy(protoName, Translate("Default"));
+ mir_strcpy(protoName, Translate("Default"));
}
else {
CallProtoService(proto->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
@@ -1506,7 +1506,7 @@ void Options::init()
proto->setSRMMFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1515,7 +1515,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1524,7 +1524,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMTemplateFilename(tmpPath);
db_free(&dbv);
@@ -1539,7 +1539,7 @@ void Options::init()
proto->setChatFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1548,7 +1548,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1557,7 +1557,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatTemplateFilename(tmpPath);
db_free(&dbv);
@@ -1572,7 +1572,7 @@ void Options::init()
proto->setHistoryFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1581,7 +1581,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1590,7 +1590,7 @@ void Options::init()
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- strcpy(tmpPath, dbv.pszVal);
+ mir_strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
db_free(&dbv);
@@ -1691,17 +1691,17 @@ void Options::saveProtocolSettings()
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- strcpy(tmpPath, proto->getSRMMBackgroundFilename());
+ mir_strcpy(tmpPath, proto->getSRMMBackgroundFilename());
PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- strcpy(tmpPath, proto->getSRMMCssFilename());
+ mir_strcpy(tmpPath, proto->getSRMMCssFilename());
PathToRelative(proto->getSRMMCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- strcpy(tmpPath, proto->getSRMMTemplateFilename());
+ mir_strcpy(tmpPath, proto->getSRMMTemplateFilename());
PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1713,17 +1713,17 @@ void Options::saveProtocolSettings()
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- strcpy(tmpPath, proto->getChatBackgroundFilename());
+ mir_strcpy(tmpPath, proto->getChatBackgroundFilename());
PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- strcpy(tmpPath, proto->getChatCssFilename());
+ mir_strcpy(tmpPath, proto->getChatCssFilename());
PathToRelative(proto->getChatCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- strcpy(tmpPath, proto->getChatTemplateFilename());
+ mir_strcpy(tmpPath, proto->getChatTemplateFilename());
PathToRelative(proto->getChatTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1735,17 +1735,17 @@ void Options::saveProtocolSettings()
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- strcpy(tmpPath, proto->getHistoryBackgroundFilename());
+ mir_strcpy(tmpPath, proto->getHistoryBackgroundFilename());
PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- strcpy(tmpPath, proto->getHistoryCssFilename());
+ mir_strcpy(tmpPath, proto->getHistoryCssFilename());
PathToRelative(proto->getHistoryCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- strcpy(tmpPath, proto->getHistoryTemplateFilename());
+ mir_strcpy(tmpPath, proto->getHistoryTemplateFilename());
PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index ed23d53b5c..ed336a4eea 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -157,9 +157,9 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod
}
else {
if (dwFlags & SMF_LOG_USELONGDATE)
- strcpy(format, "D");
+ mir_strcpy(format, "D");
else
- strcpy(format, "d");
+ mir_strcpy(format, "d");
}
}
if (mode == 0 || mode == 2) {
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
index 675430af55..e9c6b01faf 100644
--- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
+++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
@@ -177,12 +177,12 @@ char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG
if (dwFlags & MWF_LOG_USERELATIVEDATES && check >= today) {
dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t";
- strcpy(szResult, Translate("Today"));
+ mir_strcpy(szResult, Translate("Today"));
strcat(szResult, ", ");
}
else if (dwFlags & MWF_LOG_USERELATIVEDATES && check > (today - 86400)) {
dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t";
- strcpy(szResult, Translate("Yesterday"));
+ mir_strcpy(szResult, Translate("Yesterday"));
strcat(szResult, ", ");
}
else {
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index e81e1fd85a..e0b9feb3f2 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -175,7 +175,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
if (tmpm == NULL)
return;
- strcpy(tempBase, "file://");
+ mir_strcpy(tempBase, "file://");
strncat(tempBase, tmpm->getFilename(), SIZEOF(tempBase) - mir_strlen(tempBase));
char *pathrun = tempBase + mir_strlen(tempBase);
while ((*pathrun != '\\' && *pathrun != '/') && (pathrun > tempBase))
@@ -346,7 +346,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
TemplateMap *tmpm = getTemplateMap(protoSettings);
if (tmpm != NULL) {
- strcpy(tempBase, "file://");
+ mir_strcpy(tempBase, "file://");
strcat(tempBase, tmpm->getFilename());
char* pathrun = tempBase + mir_strlen(tempBase);
while ((*pathrun != '\\' && *pathrun != '/') && (pathrun > tempBase)) pathrun--;
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index ce9108f78a..e31a16a8b9 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -373,7 +373,7 @@ static INT_PTR CALLBACK AccountsMatcherProc(HWND hwndDlg, UINT uMsg, WPARAM wPar
static char* newStr(const char *s)
{
- return (s == NULL) ? NULL : strcpy(new char[mir_strlen(s) + 1], s);
+ return (s == NULL) ? NULL : mir_strcpy(new char[mir_strlen(s) + 1], s);
}
static bool FindDestAccount(const char *szProto)
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 85932785a4..b753cdd511 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -668,7 +668,7 @@ void createProtocolList(void)
ProtoList.protoInfo[i].visible = FALSE;
}
else {
- strcpy(ProtoList.protoInfo[i].szProto, proto[i]->szModuleName);
+ mir_strcpy(ProtoList.protoInfo[i].szProto, proto[i]->szModuleName);
ProtoList.protoInfo[i].enabled = FALSE;
if (!mir_strcmp(proto[i]->szModuleName, META_PROTO))
ProtoList.protoInfo[i].visible = FALSE;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 1a379b065a..3ace9e85a8 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -344,7 +344,7 @@ void getIP(MCONTACT hContact, LPSTR szProto, LPSTR szIP)
mir_snprintf(szmIP, SIZEOF(szmIP), "External IP: %d.%d.%d.%d\r\n", mIP >> 24, (mIP >> 16) & 0xFF, (mIP >> 8) & 0xFF, mIP & 0xFF);
if (rIP)
mir_snprintf(szrIP, SIZEOF(szrIP), "Internal IP: %d.%d.%d.%d\r\n", rIP >> 24, (rIP >> 16) & 0xFF, (rIP >> 8) & 0xFF, rIP & 0xFF);
- strcpy(szIP, szrIP);
+ mir_strcpy(szIP, szrIP);
strcat(szIP, szmIP);
}
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp
index b3dc9f4269..cff928a336 100644
--- a/plugins/MirOTR/src/svcs_proto.cpp
+++ b/plugins/MirOTR/src/svcs_proto.cpp
@@ -139,7 +139,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
if (options.prefix_messages) {
size_t len = (mir_strlen(options.prefix)+mir_strlen(newmessage)+1)*sizeof(char);
char* tmp = (char*)mir_alloc( len );
- strcpy(tmp, options.prefix);
+ mir_strcpy(tmp, options.prefix);
strcat(tmp, newmessage);
msg_free(newmessage);
newmessage = tmp;
diff --git a/plugins/NewAwaySysMod/src/Common.h b/plugins/NewAwaySysMod/src/Common.h
index b254e292b9..cb8af145fa 100644
--- a/plugins/NewAwaySysMod/src/Common.h
+++ b/plugins/NewAwaySysMod/src/Common.h
@@ -320,7 +320,7 @@ static __inline int LogMessage(const char *Format, ...)
{
va_list va;
char szText[8096];
- strcpy(szText, LOG_PREFIX);
+ mir_strcpy(szText, LOG_PREFIX);
va_start(va, Format);
mir_vsnprintf(szText + (SIZEOF(LOG_PREFIX) - 1), sizeof(szText) - (SIZEOF(LOG_PREFIX) - 1), Format, va);
va_end(va);
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 451bd8af1c..f1436bee2c 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -1442,9 +1442,9 @@ static INT_PTR CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wPara
mir_free(tmp);
char *subkeytype = (char*)mir_alloc(6);
if(strstr(tmp2, "RSA"))
- strcpy(subkeytype, "RSA");
+ mir_strcpy(subkeytype, "RSA");
else if(strstr(tmp2, "DSA")) //this is useless check for now, but it will be required if someone add another key types support
- strcpy(subkeytype, "ELG-E");
+ mir_strcpy(subkeytype, "ELG-E");
f<<tmp2;
mir_free(tmp2);
f<<"\n";
@@ -2366,7 +2366,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*)mir_alloc(sizeof(char)*(output.substr(s,s2-s-(uncommon?1:0)).length()+1));
- strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hcnt, szGPGModuleName, "KeyMainName", tmp);
mir_free(tmp);
@@ -2382,7 +2382,7 @@ void ImportKey()
if(output[s] == ')')
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hcnt, szGPGModuleName, "KeyComment", tmp);
mir_free(tmp);
@@ -2391,7 +2391,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*) mir_alloc(sizeof(char)*(output.substr(s,s2-s).length()+1));
- strcpy(tmp, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hcnt, szGPGModuleName, "KeyMainEmail", tmp);
mir_free(tmp);
@@ -2400,7 +2400,7 @@ void ImportKey()
else
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hcnt, szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
mir_free(tmp);
@@ -2438,7 +2438,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*)mir_alloc(sizeof(char)*(output.substr(s,s2-s-(uncommon?1:0)).length()+1));
- strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
mir_utf8decode(tmp, 0);
db_set_s(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainName", tmp);
mir_free(tmp);
@@ -2453,7 +2453,7 @@ void ImportKey()
if(output[s] == ')')
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(metaGetMostOnline(hContact), szGPGModuleName, "KeyComment", tmp);
mir_free(tmp);
@@ -2462,7 +2462,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*) mir_alloc(sizeof(char)*(output.substr(s,s2-s).length()+1));
- strcpy(tmp, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp, 0);
db_set_s(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainEmail", tmp);
mir_free(tmp);
@@ -2471,7 +2471,7 @@ void ImportKey()
else
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
mir_free(tmp);
@@ -2508,7 +2508,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*)mir_alloc(sizeof(char)*(output.substr(s,s2-s-(uncommon?1:0)).length()+1));
- strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s-(uncommon?1:0)).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hContact, szGPGModuleName, "KeyMainName", tmp);
mir_free(tmp);
@@ -2523,7 +2523,7 @@ void ImportKey()
if(output[s] == ')')
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hContact, szGPGModuleName, "KeyComment", tmp);
mir_free(tmp);
@@ -2532,7 +2532,7 @@ void ImportKey()
if(s != string::npos && s2 != string::npos)
{
tmp = (char*) mir_alloc(sizeof(char)*(output.substr(s,s2-s).length()+1));
- strcpy(tmp, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hContact, szGPGModuleName, "KeyMainEmail", tmp);
mir_free(tmp);
@@ -2541,7 +2541,7 @@ void ImportKey()
else
{
tmp = (char*)mir_alloc(sizeof(char)* (output.substr(s2,s-s2).length()+1));
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(hContact, szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
mir_free(tmp);
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index ea2b7370f3..d13bd66a3b 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -263,7 +263,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(bDebugLog)
debuglog<<std::string(time_str()+": info: Failed to decrypt GPG encrypted message.");
char *tmp = (char*)mir_alloc(sizeof(char)*(str.length()+1));
- strcpy(tmp, str.c_str());
+ mir_strcpy(tmp, str.c_str());
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
@@ -437,7 +437,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
else if(s2 > output.find("<", s))
s2 = output.find("<", s);
tmp = (char*)mir_alloc(output.substr(s,s2-s-1).length()+1);
- strcpy(tmp, output.substr(s,s2-s-1).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s-1).c_str());
mir_utf8decode(tmp, 0);
db_set_s(ccs->hContact, szGPGModuleName, "KeyMainName", tmp);
mir_free(tmp);
@@ -449,14 +449,14 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if(output[s] == ')')
{
tmp = (char*)mir_alloc(output.substr(s2,s-s2).length()+1);
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(ccs->hContact, szGPGModuleName, "KeyComment", tmp);
mir_free(tmp);
s+=3;
s2 = output.find(">", s);
tmp = (char*)mir_alloc(output.substr(s,s2-s).length()+1);
- strcpy(tmp, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp, 0);
db_set_s(ccs->hContact, szGPGModuleName, "KeyMainEmail", tmp);
mir_free(tmp);
@@ -464,7 +464,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
else
{
tmp = (char*)mir_alloc(output.substr(s2,s-s2).length()+1);
- strcpy(tmp, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp, 0);
db_set_s(ccs->hContact, szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
mir_free(tmp);
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 1e0951af35..de5178e515 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -964,7 +964,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
string::size_type s = output.find("gpg: key ") + mir_strlen("gpg: key ");
string::size_type s2 = output.find(":", s);
tmp2 = (char*)mir_alloc((output.substr(s,s2-s).length()+1)*sizeof(char));
- strcpy(tmp2, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp2, 0);
{
if(db_mc_isMeta(hContact))
@@ -1012,7 +1012,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
if(s2 != string::npos && s != string::npos)
{
tmp2 = (char*)mir_alloc(sizeof(char)*(output.substr(s,s2-s-(uncommon?1:0)).length()+1));
- strcpy(tmp2, output.substr(s,s2-s-(uncommon?1:0)).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s-(uncommon?1:0)).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
{
@@ -1047,7 +1047,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
if(output[s] == ')')
{
tmp2 = (char*)mir_alloc((output.substr(s2,s-s2).length()+1)*sizeof(char));
- strcpy(tmp2, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp2, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
{
@@ -1071,7 +1071,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
s+=3;
s2 = output.find(">", s);
tmp2 = (char*)mir_alloc((output.substr(s,s2-s).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
{
@@ -1100,7 +1100,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
else
{
tmp2 = (char*)mir_alloc(output.substr(s2,s-s2).length()+1);
- strcpy(tmp2, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp2, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
{
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index ddd170eece..c5ca301b30 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1187,7 +1187,7 @@ bool isGPGValid()
return is_valid && gpg_exists;
}
-#define NEWTSTR_MALLOC(A) (A==NULL)?NULL:strcpy((char*)mir_alloc(sizeof(char)*(mir_strlen(A)+1)),A)
+#define NEWTSTR_MALLOC(A) (A==NULL)?NULL:mir_strcpy((char*)mir_alloc(sizeof(char)*(mir_strlen(A)+1)),A)
const bool StriStr(const char *str, const char *substr)
{
@@ -1782,7 +1782,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
string::size_type s = output.find("gpg: key ") + mir_strlen("gpg: key ");
string::size_type s2 = output.find(":", s);
tmp2 = (char*)mir_alloc((output.substr(s,s2-s).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp2, 0);
db_set_s(hContact, szGPGModuleName, "KeyID", tmp2);
mir_free(tmp2);
@@ -1801,7 +1801,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
if(s2 != string::npos)
{
tmp2 = (char*)mir_alloc((output.substr(s,s2-s-1).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s,s2-s-1).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s-1).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
{
@@ -1816,7 +1816,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
if(output[s] == ')')
{
tmp2 = (char*)mir_alloc((output.substr(s2,s-s2).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp2, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
db_set_s(hContact, szGPGModuleName, "KeyComment", output.substr(s2,s-s2).c_str());
@@ -1824,7 +1824,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
s+=3;
s2 = output.find(">", s);
tmp2 = (char*)mir_alloc((output.substr(s,s2-s).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s,s2-s).c_str());
+ mir_strcpy(tmp2, output.substr(s,s2-s).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
db_set_s(hContact, szGPGModuleName, "KeyMainEmail", output.substr(s,s2-s).c_str());
@@ -1833,7 +1833,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
else
{
tmp2 = (char*)mir_alloc((output.substr(s2,s-s2).length()+1) * sizeof(char));
- strcpy(tmp2, output.substr(s2,s-s2).c_str());
+ mir_strcpy(tmp2, output.substr(s2,s-s2).c_str());
mir_utf8decode(tmp2, 0);
if(hContact)
db_set_s(hContact, szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 24703b4c93..ccaa13d0b9 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -340,7 +340,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact2, IGNOREEVENT_USERONLINE);
db_set_s(hContact2, MODNAME, "Nick", Translate("New Non-IM Contact"));
// blank dbVar2 so the replaceing doesnt crash..
- strcpy(dbVar2, "");
+ mir_strcpy(dbVar2, "");
// copy the name (dbVar1 is the name)
for (i = 0; i <= k; i++)
copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]);
@@ -348,7 +348,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
db_set_s(hContact2, MODNAME, "Name", dbVar2);
// copy the ProgramString
if (db_get_static(hContact1, MODNAME, "ProgramString", dbVar1, SIZEOF(dbVar1))) {
- strcpy(dbVar2, "");
+ mir_strcpy(dbVar2, "");
for (i = 0; i <= k; i++)
copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]);
@@ -356,7 +356,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
// copy the ProgramParamString
if (db_get_static(hContact1, MODNAME, "ProgramParamString", dbVar1, SIZEOF(dbVar1))) {
- strcpy(dbVar2, "");
+ mir_strcpy(dbVar2, "");
for (i = 0; i <= k; i++)
copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]);
@@ -364,7 +364,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
// copy the group
if (db_get_static(hContact1, "CList", "Group", dbVar1, SIZEOF(dbVar1))) {
- strcpy(dbVar2, "");
+ mir_strcpy(dbVar2, "");
for (i = 0; i <= k; i++)
copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]);
@@ -372,7 +372,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
// copy the ToolTip
if (db_get_static(hContact1, MODNAME, "ToolTip", dbVar1, SIZEOF(dbVar1))) {
- strcpy(dbVar2, "");
+ mir_strcpy(dbVar2, "");
for (i = 0; i <= k; i++)
copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]);
@@ -529,7 +529,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
}
else if (!strncmp(line, "ToolTip=", mir_strlen("ToolTip="))) {
i = (int)mir_strlen("ToolTip=");
- strcpy(tooltip, &line[i]);
+ mir_strcpy(tooltip, &line[i]);
fgets(line, 2000, file);
while (!strstr(line, "</tooltip>\r\n")) {
strcat(tooltip, line);
@@ -616,8 +616,8 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
if (usetimer && timer) {
char tmp[64], tmp2[8];
if (minutes)
- strcpy(tmp2, "Minutes");
- else strcpy(tmp2, "Seconds");
+ mir_strcpy(tmp2, "Minutes");
+ else mir_strcpy(tmp2, "Seconds");
mir_snprintf(tmp, SIZEOF(tmp), "UseTimer: Yes\r\nTimer: %d %s", timer, tmp2);
char *msgtemp = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(tmp) + 1);
if (msgtemp) {
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp
index d91012ab1c..5f7044cf12 100644
--- a/plugins/Non-IM Contact/src/files.cpp
+++ b/plugins/Non-IM Contact/src/files.cpp
@@ -49,8 +49,8 @@ int Openfile(char *outputFile, int saveOpen) //0=save, 1=open
int r;
char title[16];
if (saveOpen)
- strcpy(title, "Open file");
- else strcpy(title, "Save to file");
+ mir_strcpy(title, "Open file");
+ else mir_strcpy(title, "Save to file");
OPENFILENAMEA ofn = { sizeof(ofn) };
ofn.lpstrFile = filename;
@@ -173,7 +173,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
char text[512], url[512], fn[10] = "fn0", szFileName[MAX_PATH], temp[512];
int i, timer;
GetDlgItemTextA(hwnd, IDC_URL, text, SIZEOF(text));
- strcpy(url, text);
+ mir_strcpy(url, text);
if (!InternetDownloadFile(text)) {
for (i = 0;; i++) {
mir_snprintf(fn, SIZEOF(fn), "fn%d", i);
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 3956f03fe1..08143c5f62 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -34,7 +34,7 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM lParam)
editContact(wParam, 0); // for later when i add a second double click setting
else if (db_get_static(wParam, MODNAME, "Program", program, SIZEOF(program)) && mir_strcmp(program, "")) {
if (!db_get_static(wParam, MODNAME, "ProgramParams", params, SIZEOF(params)))
- strcpy(params, "");
+ mir_strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)program);
else shellEXEerror = (int)ShellExecuteA(NULL, NULL, program, params, NULL, SW_SHOW); //ignore the warning, its M$'s backwards compatabilty screwup :)
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp
index 091b9e3718..f04e290da0 100644
--- a/plugins/Non-IM Contact/src/namereplacing.cpp
+++ b/plugins/Non-IM Contact/src/namereplacing.cpp
@@ -30,7 +30,7 @@ int readFileIntoArray(int fileNumber, char *FileContents[])
FileContents[i] = (char*)malloc(mir_strlen(temp) + 1);
if (FileContents[i] == NULL) break;
- strcpy(FileContents[i], temp);
+ mir_strcpy(FileContents[i], temp);
}
fclose(file);
return i;
@@ -228,7 +228,7 @@ void checkStringForcompare(char *str)
}
else strncat(newStr, &str[i], 1);
}
- strcpy(str, newStr);
+ mir_strcpy(str, newStr);
free(newStr);
free(copyOfStr);
}
@@ -254,7 +254,7 @@ void checkStringForSave(MCONTACT hContact, char* str)
}
else strncat(newStr, &str[i], 1);
}
- strcpy(str, newStr);
+ mir_strcpy(str, newStr);
free(newStr);
free(copyOfStr);
}
@@ -283,7 +283,7 @@ void checkStringForLoad(MCONTACT hContact, char* str)
}
else strncat(newStr, &str[i], 1);
}
- strcpy(str, newStr);
+ mir_strcpy(str, newStr);
free(newStr);
free(copyOfStr);
}
@@ -328,7 +328,7 @@ void checkStringForSaveN(char* str)
}
else strncat(newStr, &str[i], 1);
}
- strcpy(str, newStr);
+ mir_strcpy(str, newStr);
free(newStr);
free(copyOfStr);
}
@@ -371,7 +371,7 @@ void checkStringForLoadN(char* str)
}
else strncat(newStr, &str[i], 1);
}
- strcpy(str, newStr);
+ mir_strcpy(str, newStr);
free(newStr);
free(copyOfStr);
}
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp
index 7795a52ee6..39c218361d 100644
--- a/plugins/NotesAndReminders/src/notes.cpp
+++ b/plugins/NotesAndReminders/src/notes.cpp
@@ -1743,7 +1743,7 @@ char* GetPreviewString(const char *lpsz)
if (l <= MaxLen)
{
- strcpy(s, lpsz);
+ mir_strcpy(s, lpsz);
}
else
{
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index 35cc173008..457b2c8086 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -935,7 +935,7 @@ void __cdecl udptcpThreadFunc(void *useUdp)
DWORD ec = WSAGetLastError();
char buf[4096];
- strcpy(buf, Translate("N/A: Failed to format error message"));
+ mir_strcpy(buf, Translate("N/A: Failed to format error message"));
DWORD fm = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, ec, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 4096, NULL);
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h
index 49d6df34d8..a39e9053b2 100644
--- a/plugins/Popup/src/font.h
+++ b/plugins/Popup/src/font.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//basic constants for all popup plugins
#define PU_FNT_AND_COLOR LPGEN("Popups") //common main group for customice\font&color
-#define PU_FNT_AND_COLOR_DB MODULNAME //use eg strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
+#define PU_FNT_AND_COLOR_DB MODULNAME //use eg mir_strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
#define PU_FNT_NAME_TITLE LPGEN("Title") //use eg mir_tstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 5acf5b7309..d67dd92a36 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -147,7 +147,7 @@ void wSetData(char **Data, const char *Value)
{
if (Value[0] != 0) {
char *newData = (char*)mir_alloc(mir_strlen(Value)+3);
- strcpy(newData, Value);
+ mir_strcpy(newData, Value);
*Data = newData;
}
else *Data = "";
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 2c42967039..0394d4d522 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -145,17 +145,17 @@ extern "C" int __declspec(dllexport) Load()
// Set vars
strcat(gMirandaDir, "\\");
- strcpy(gIniFile, gMirandaDir);
+ mir_strcpy(gIniFile, gMirandaDir);
// Store last pos
strTmp = &gIniFile[mir_strlen(gIniFile)];
// Lets try fist name
- strcpy(strTmp, INI_FILE_NAME);
+ mir_strcpy(strTmp, INI_FILE_NAME);
if (_access(gIniFile, 4) != 0) {
// Not found, lets try the other aproach
- strcpy(strTmp, "plugins\\" INI_FILE_NAME);
+ mir_strcpy(strTmp, "plugins\\" INI_FILE_NAME);
if (_access(gIniFile, 4) != 0) {
// Not found :(
@@ -567,7 +567,7 @@ void DeleteFileOrFolder(const char *name)
do {
if (mir_strcmp(findData.cFileName, ".") && mir_strcmp(findData.cFileName, "..")) {
- strcpy(strTmp, findData.cFileName);
+ mir_strcpy(strTmp, findData.cFileName);
DeleteFileOrFolder(tmp);
}
}
@@ -641,7 +641,7 @@ int EnumProc(const char *szName, LPARAM lParam)
// Add to the struct
if (len > 0 && len < sizeof(dms->buffer) - dms->pos - 2) {
- strcpy(&dms->buffer[dms->pos], szName);
+ mir_strcpy(&dms->buffer[dms->pos], szName);
dms->pos += len + 1;
}
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index affb3812bd..a6c7264a49 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -265,11 +265,11 @@ static int AppendUnicodeOrAnsiiToBufferL(char *&buffer, size_t &cbBufferEnd, siz
char *d = buffer + cbBufferEnd;
if (isAnsii) {
- strcpy(d, "{");
+ mir_strcpy(d, "{");
d++;
}
else {
- strcpy(d, "{\\uc1 ");
+ mir_strcpy(d, "{\\uc1 ");
d += 6;
}
@@ -309,7 +309,7 @@ static int AppendUnicodeOrAnsiiToBufferL(char *&buffer, size_t &cbBufferEnd, siz
memcpy(d, " ", 1);
d++;
}
- strcpy(d, "}");
+ mir_strcpy(d, "}");
d++;
cbBufferEnd = (int)(d - buffer);
@@ -965,7 +965,7 @@ void LoadMsgLogIcons(void)
char *szDest = pLogIconBmpBits[i] + rtfHeaderSize;
bin2hex(&bih, sizeof(bih), szDest); szDest += sizeof(bih) * 2;
bin2hex(pBmpBits, widthBytes * bih.biHeight, szDest); szDest += widthBytes * bih.biHeight * 2;
- strcpy(szDest, "}");
+ mir_strcpy(szDest, "}");
logIconBmpSize[i] = size_t(szDest - pLogIconBmpBits[i]) + 1;
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index 9137f9b592..40204b4789 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -191,7 +191,7 @@ void addMsg2Queue(pUinKey ptr, WPARAM wParam, LPSTR szMsg)
void getContactNameA(MCONTACT hContact, LPSTR szName)
{
- strcpy(szName, (LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ mir_strcpy(szName, (LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
}
void getContactName(MCONTACT hContact, LPSTR szName)
@@ -220,7 +220,7 @@ void getContactUinA(MCONTACT hContact, LPSTR szUIN)
else
sprintf(szUIN, "%s [%s]", dbv_uniqueid.pszVal, ptr->name); //!!!!!!!!!!!
}
- else strcpy(szUIN, " == = unknown == =");
+ else mir_strcpy(szUIN, " == = unknown == =");
db_free(&dbv_uniqueid);
}
diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp
index 90b44148ed..6e99874fd1 100644
--- a/plugins/SecureIM/src/mmi.cpp
+++ b/plugins/SecureIM/src/mmi.cpp
@@ -38,7 +38,7 @@ char* m_awstrcat(LPCSTR strA, LPCSTR strB)
{
int lenA = (int)mir_strlen(strA);
LPSTR tmpA = (LPSTR)mir_alloc((lenA + 1)*(sizeof(WCHAR) + 1));
- strcpy(tmpA, strA);
+ mir_strcpy(tmpA, strA);
MultiByteToWideChar(CP_ACP, 0, strA, -1, (LPWSTR)(tmpA + lenA + 1), (lenA + 1)*sizeof(WCHAR));
LPSTR str = m_wwstrcat(tmpA, strB);
mir_free(tmpA);
@@ -51,7 +51,7 @@ char* m_aastrcat(LPCSTR strA, LPCSTR strB)
int lenA = (int)mir_strlen(strA);
int lenB = (int)mir_strlen(strB);
LPSTR str = (LPSTR)mir_alloc((lenA + lenB + 1)*(sizeof(WCHAR) + 1));
- strcpy(str, strA);
+ mir_strcpy(str, strA);
strcat(str, strB);
MultiByteToWideChar(CP_ACP, 0, str, -1, (LPWSTR)(str + lenA + lenB + 1), (lenA + lenB + 1)*sizeof(WCHAR));
return str;
@@ -64,7 +64,7 @@ char* m_ustrcat(LPCSTR strA, LPCSTR strB)
{
SAFE_FREE(m_string);
m_string = (LPSTR)mir_alloc(mir_strlen(strA) + mir_strlen(strB) + 1);
- strcpy(m_string, strA); strcat(m_string, strB);
+ mir_strcpy(m_string, strA); strcat(m_string, strB);
return m_string;
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp
index 61e09f5ff2..3d9002b57c 100644
--- a/plugins/SecureIM/src/options.cpp
+++ b/plugins/SecureIM/src/options.cpp
@@ -75,7 +75,7 @@ void LV_GetItemTextA(HWND hwnd, WPARAM wparam, int iSubItem, LPSTR text, int cch
lvi.pszText = text;
SNDMSG(hwnd, LVM_GETITEMTEXTW, wparam, (LPARAM)&lvi);
lvi.pszText = mir_u2a((LPWSTR)text);
- strcpy(text, lvi.pszText);
+ mir_strcpy(text, lvi.pszText);
mir_free(lvi.pszText);
}
diff --git a/plugins/SecureIM/src/splitmsg.cpp b/plugins/SecureIM/src/splitmsg.cpp
index c58cfab9e3..4fef281087 100644
--- a/plugins/SecureIM/src/splitmsg.cpp
+++ b/plugins/SecureIM/src/splitmsg.cpp
@@ -59,7 +59,7 @@ LPSTR combineMessage(pUinKey ptr, LPSTR szMsg)
memset(pm->message, 0, sizeof(LPSTR)*part_all);
}
pm->message[part_num] = new char[mir_strlen(szMsg)];
- strcpy(pm->message[part_num], szMsg + 8);
+ mir_strcpy(pm->message[part_num], szMsg + 8);
Sent_NetLog("combine: save part: %s", pm->message[part_num]);
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp
index 756a2dbf0f..9b2a3cb669 100644
--- a/plugins/SecureIM/src/svcs_proto.cpp
+++ b/plugins/SecureIM/src/svcs_proto.cpp
@@ -111,7 +111,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
Sent_NetLog("onRecvMsg: combine untagged splitted message");
LPSTR tmp = (LPSTR)mir_alloc(mir_strlen(ptr->msgSplitted) + mir_strlen(szEncMsg) + 1);
- strcpy(tmp, ptr->msgSplitted);
+ mir_strcpy(tmp, ptr->msgSplitted);
strcat(tmp, szEncMsg);
mir_free(ptr->msgSplitted);
ptr->msgSplitted = szEncMsg = ppre->szMessage = tmp;
@@ -225,7 +225,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
cpp_reset_context(ptr->cntx);
ptrA reSend((LPSTR)mir_alloc(mir_strlen(szEncMsg) + LEN_RSND));
- strcpy(reSend, SIG_RSND); // copy resend sig
+ mir_strcpy(reSend, SIG_RSND); // copy resend sig
strcat(reSend, szEncMsg); // add mess
pccsd->wParam |= PREF_METANODB;
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
index 5f563b8005..dd19d18176 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
@@ -77,7 +77,7 @@ void CSendHost_Imgur::SendThread(void* obj)
thumblen=ext-self->m_URL;
memcpy(self->m_URLthumb,self->m_URL,thumblen);
self->m_URLthumb[thumblen]='m'; // 320x320, see http://api.imgur.com/models/image
- strcpy(self->m_URLthumb+thumblen+1,self->m_URL+thumblen);
+ mir_strcpy(self->m_URLthumb+thumblen+1,self->m_URL+thumblen);
}
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)reply);
self->svcSendMsgExit(self->m_URL); return;
diff --git a/plugins/SendScreenshotPlus/src/mir_string.cpp b/plugins/SendScreenshotPlus/src/mir_string.cpp
index f0c2414085..53d1b0763b 100644
--- a/plugins/SendScreenshotPlus/src/mir_string.cpp
+++ b/plugins/SendScreenshotPlus/src/mir_string.cpp
@@ -41,7 +41,7 @@ void mir_stradd(char* &pszDest, const char* pszSrc)
size_t lenNew = lenDest + lenSrc + 1;
pszDest = (char *) mir_realloc(pszDest, sizeof(char)* lenNew);
- strcpy(pszDest + lenDest, pszSrc);
+ mir_strcpy(pszDest + lenDest, pszSrc);
pszDest[lenNew-1] = 0;
}
}
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index 7a15a7131d..87afd484ab 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -45,7 +45,7 @@ void AddSessionMark(MCONTACT hContact, int mode, char bit)
if (mir_strlen(szValue) < g_ses_count) {
pszBuffer = (char*)mir_alloc(g_ses_count + 1);
memset(pszBuffer, 0, (g_ses_count + 1));
- strcpy(pszBuffer, szValue);
+ mir_strcpy(pszBuffer, szValue);
}
else pszBuffer = szValue.detouch();
@@ -160,7 +160,7 @@ void AddInSessionOrder(MCONTACT hContact, int mode, int ordernum, int writemode)
if (mir_strlen(szValue) < (g_ses_count * 2)) {
pszBuffer = (char*)mir_alloc((g_ses_count * 2) + 1);
memset(pszBuffer, 0, ((g_ses_count * 2) + 1));
- strcpy(pszBuffer, szValue);
+ mir_strcpy(pszBuffer, szValue);
}
else pszBuffer = mir_strdup(szValue);
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp
index e2df1aed45..338b84d279 100644
--- a/plugins/SmileyAdd/src/download.cpp
+++ b/plugins/SmileyAdd/src/download.cpp
@@ -99,7 +99,7 @@ bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl)
szRedirUrl = (char*)mir_realloc(szRedirUrl, rlen + mir_strlen(nlhrReply->headers[i].szValue)*3 + 1);
strncpy(szRedirUrl, szUrl, rlen);
- strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue);
+ mir_strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue);
nlhr.szUrl = szRedirUrl;
break;
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp
index 546227a31b..ae3692b1f6 100644
--- a/plugins/Spamotron/src/bayes.cpp
+++ b/plugins/Spamotron/src/bayes.cpp
@@ -51,7 +51,7 @@ int OpenBayes()
tmp = Utils_ReplaceVars("%miranda_userdata%");
if (tmp[mir_strlen(tmp)-1] == '\\')
tmp[mir_strlen(tmp)-1] = 0;
- strcpy(bayesdb_fullpath, tmp);
+ mir_strcpy(bayesdb_fullpath, tmp);
strcat(bayesdb_fullpath, "\\"BAYESDB_PATH);
mir_free(tmp);
}
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 3f7e3fe04e..a9701c81a2 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -500,7 +500,7 @@ void RemoveNotOnListSettings()
DBVARIANT dbv;
char protoName[256] = {0};
MCONTACT hContact = db_find_first();
- strcpy(protoName, "proto_");
+ mir_strcpy(protoName, "proto_");
while (hContact != NULL) {
if (db_get_s(hContact, "Protocol", "p", &dbv) == 0) {
strcat(protoName, dbv.pszVal);
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp
index 2c8ba48df7..8dc361d002 100644
--- a/plugins/Spamotron/src/utils.cpp
+++ b/plugins/Spamotron/src/utils.cpp
@@ -498,7 +498,7 @@ void MarkUnread(MCONTACT hContact)
memcpy(&_dbei.timestamp, pos, sizeof(DWORD)); pos += sizeof(DWORD);
_dbei.szModule = (char*)malloc(mir_strlen((const char*)pos)+1);
- strcpy(_dbei.szModule, (const char*)pos);
+ mir_strcpy(_dbei.szModule, (const char*)pos);
pos += mir_strlen((const char*)pos)+1;
memcpy(&_dbei.cbBlob, pos, sizeof(DWORD)); pos += sizeof(DWORD);
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
index 24fdfe117a..2eb6dde172 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
@@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DBVARIANT dbv;
if ( !db_get(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i],SETTING_STATUSMSG), &dbv)) {
settings[count]->msg = ( char* )malloc(mir_strlen(dbv.pszVal) + 1);
- strcpy(settings[count]->msg, dbv.pszVal);
+ mir_strcpy(settings[count]->msg, dbv.pszVal);
db_free(&dbv);
}
else settings[count]->msg = NULL;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 19200e5f9d..936f398a43 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -83,10 +83,10 @@ static char* GetCMDLArguments(TSettingsList& protoSettings)
for (int i=0; i < protoSettings.getCount(); i++ ) {
*pnt++ = '/';
- strcpy(pnt, protoSettings[i].szName);
+ mir_strcpy(pnt, protoSettings[i].szName);
pnt += mir_strlen(protoSettings[i].szName);
*pnt++ = '=';
- strcpy(pnt, GetStatusDesc(protoSettings[i].status));
+ mir_strcpy(pnt, GetStatusDesc(protoSettings[i].status));
pnt += mir_strlen(GetStatusDesc(protoSettings[i].status));
if (i != protoSettings.getCount()-1) {
*pnt++ = ' ';
@@ -100,7 +100,7 @@ static char* GetCMDLArguments(TSettingsList& protoSettings)
*pnt++ = '\0';
cmdl = ( char* )realloc(cmdl, mir_strlen(cmdl) + 12);
pnt = cmdl + mir_strlen(cmdl);
- strcpy(pnt, "/showdialog");
+ mir_strcpy(pnt, "/showdialog");
pnt += 11;
*pnt = '\0';
}
@@ -946,7 +946,7 @@ static int DeleteSetting(const char *szSetting,LPARAM lParam)
{
char** settings = (char**)*(char ***)lParam;
settings[settingIndex] = ( char* )malloc(mir_strlen(szSetting)+1);
- strcpy(settings[settingIndex], szSetting);
+ mir_strcpy(settings[settingIndex], szSetting);
settingIndex += 1;
return 0;
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 12bb62e657..6c0721926e 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -30,9 +30,9 @@ extern int IsTrayProto(const TCHAR *swzProto, BOOL bExtendedTip)
char szSetting[64];
if (bExtendedTip)
- strcpy(szSetting, "TrayProtocolsEx");
+ mir_strcpy(szSetting, "TrayProtocolsEx");
else
- strcpy(szSetting, "TrayProtocols");
+ mir_strcpy(szSetting, "TrayProtocols");
DBVARIANT dbv;
int result = 1;
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 8ae1171ed2..b196ee3ea1 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -127,8 +127,8 @@ void InitFonts()
colourBg.cbSize = sizeof(ColourIDT);
_tcscpy(colourBg.group, LPGENT("Tooltips"));
_tcscpy(colourBg.name, LPGENT("Background"));
- strcpy(colourBg.dbSettingsGroup, MODULE);
- strcpy(colourBg.setting, "ColourBg");
+ mir_strcpy(colourBg.dbSettingsGroup, MODULE);
+ mir_strcpy(colourBg.setting, "ColourBg");
colourBg.defcolour = RGB(219, 219, 219);
colourBg.order = 0;
ColourRegisterT(&colourBg);
@@ -136,8 +136,8 @@ void InitFonts()
colourBorder.cbSize = sizeof(ColourIDT);
_tcscpy(colourBorder.group, LPGENT("Tooltips"));
_tcscpy(colourBorder.name, LPGENT("Border"));
- strcpy(colourBorder.dbSettingsGroup, MODULE);
- strcpy(colourBorder.setting, "BorderCol");
+ mir_strcpy(colourBorder.dbSettingsGroup, MODULE);
+ mir_strcpy(colourBorder.setting, "BorderCol");
colourBorder.defcolour = 0;
colourBorder.order = 0;
ColourRegisterT(&colourBorder);
@@ -145,8 +145,8 @@ void InitFonts()
colourAvatarBorder.cbSize = sizeof(ColourIDT);
_tcscpy(colourAvatarBorder.group, LPGENT("Tooltips"));
_tcscpy(colourAvatarBorder.name, LPGENT("Avatar border"));
- strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
- strcpy(colourAvatarBorder.setting, "AvBorderCol");
+ mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
+ mir_strcpy(colourAvatarBorder.setting, "AvBorderCol");
colourAvatarBorder.defcolour = 0;
colourAvatarBorder.order = 0;
ColourRegisterT(&colourAvatarBorder);
@@ -154,8 +154,8 @@ void InitFonts()
colourDivider.cbSize = sizeof(ColourIDT);
_tcscpy(colourDivider.group, LPGENT("Tooltips"));
_tcscpy(colourDivider.name, LPGENT("Dividers"));
- strcpy(colourDivider.dbSettingsGroup, MODULE);
- strcpy(colourDivider.setting, "DividerCol");
+ mir_strcpy(colourDivider.dbSettingsGroup, MODULE);
+ mir_strcpy(colourDivider.setting, "DividerCol");
colourDivider.defcolour = 0;
colourDivider.order = 0;
ColourRegisterT(&colourDivider);
@@ -163,8 +163,8 @@ void InitFonts()
colourSidebar.cbSize = sizeof(ColourIDT);
_tcscpy(colourSidebar.group, LPGENT("Tooltips"));
_tcscpy(colourSidebar.name, LPGENT("Sidebar"));
- strcpy(colourSidebar.dbSettingsGroup, MODULE);
- strcpy(colourSidebar.setting, "SidebarCol");
+ mir_strcpy(colourSidebar.dbSettingsGroup, MODULE);
+ mir_strcpy(colourSidebar.setting, "SidebarCol");
colourSidebar.defcolour = RGB(192, 192, 192);
colourSidebar.order = 0;
ColourRegisterT(&colourSidebar);
@@ -173,8 +173,8 @@ void InitFonts()
fontTitle.flags = FIDF_ALLOWEFFECTS;
_tcscpy(fontTitle.group, LPGENT("Tooltips"));
_tcscpy(fontTitle.name, LPGENT("Title"));
- strcpy(fontTitle.dbSettingsGroup, MODULE);
- strcpy(fontTitle.prefix, "FontFirst");
+ mir_strcpy(fontTitle.dbSettingsGroup, MODULE);
+ mir_strcpy(fontTitle.prefix, "FontFirst");
_tcscpy(fontTitle.backgroundGroup, LPGENT("Tooltips"));
_tcscpy(fontTitle.backgroundName, LPGENT("Background"));
fontTitle.order = 0;
@@ -189,8 +189,8 @@ void InitFonts()
fontLabels.flags = FIDF_ALLOWEFFECTS;
_tcscpy(fontLabels.group, LPGENT("Tooltips"));
_tcscpy(fontLabels.name, LPGENT("Labels"));
- strcpy(fontLabels.dbSettingsGroup, MODULE);
- strcpy(fontLabels.prefix, "FontLabels");
+ mir_strcpy(fontLabels.dbSettingsGroup, MODULE);
+ mir_strcpy(fontLabels.prefix, "FontLabels");
_tcscpy(fontLabels.backgroundGroup, LPGENT("Tooltips"));
_tcscpy(fontLabels.backgroundName, LPGENT("Background"));
fontLabels.order = 1;
@@ -205,8 +205,8 @@ void InitFonts()
fontValues.flags = FIDF_ALLOWEFFECTS;
_tcscpy(fontValues.group, LPGENT("Tooltips"));
_tcscpy(fontValues.name, LPGENT("Values"));
- strcpy(fontValues.dbSettingsGroup, MODULE);
- strcpy(fontValues.prefix, "FontValues");
+ mir_strcpy(fontValues.dbSettingsGroup, MODULE);
+ mir_strcpy(fontValues.prefix, "FontValues");
_tcscpy(fontValues.backgroundGroup, LPGENT("Tooltips"));
_tcscpy(fontValues.backgroundName, LPGENT("Background"));
fontValues.order = 2;
@@ -221,8 +221,8 @@ void InitFonts()
fontTrayTitle.flags = FIDF_ALLOWEFFECTS;
_tcscpy(fontTrayTitle.group, LPGENT("Tooltips"));
_tcscpy(fontTrayTitle.name, LPGENT("Tray title"));
- strcpy(fontTrayTitle.dbSettingsGroup, MODULE);
- strcpy(fontTrayTitle.prefix, "FontTrayTitle");
+ mir_strcpy(fontTrayTitle.dbSettingsGroup, MODULE);
+ mir_strcpy(fontTrayTitle.prefix, "FontTrayTitle");
_tcscpy(fontTrayTitle.backgroundGroup, LPGENT("Tooltips"));
_tcscpy(fontTrayTitle.backgroundName, LPGENT("Background"));
fontTrayTitle.order = 0;
diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h
index 105954726e..b046816ad9 100644
--- a/plugins/TopToolBar/src/common.h
+++ b/plugins/TopToolBar/src/common.h
@@ -118,7 +118,7 @@ void RemoveFromOptions(int id);
char *AS(char *str, const char *setting, char *addstr)
{
if (str != NULL) {
- strcpy(str, setting);
+ mir_strcpy(str, setting);
strcat(str, addstr);
}
return str;
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index ab630faea8..6ef7e692e2 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -250,8 +250,8 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam)
TrafficFontID.cbSize = sizeof(FontIDT);
_tcscpy(TrafficFontID.group, LPGENT("Traffic counter"));
_tcscpy(TrafficFontID.name, LPGENT("Font"));
- strcpy(TrafficFontID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
- strcpy(TrafficFontID.prefix, "Font");
+ mir_strcpy(TrafficFontID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
+ mir_strcpy(TrafficFontID.prefix, "Font");
TrafficFontID.flags = FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
TrafficFontID.deffontsettings.charset = DEFAULT_CHARSET;
TrafficFontID.deffontsettings.colour = GetSysColor(COLOR_BTNTEXT);
@@ -265,8 +265,8 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam)
TrafficBackgroundColorID.cbSize = sizeof(ColourIDT);
_tcscpy(TrafficBackgroundColorID.group, LPGENT("Traffic counter"));
_tcscpy(TrafficBackgroundColorID.name, LPGENT("Font"));
- strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
- strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
+ mir_strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
+ mir_strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
TrafficBackgroundColorID.defcolour = GetSysColor(COLOR_BTNFACE);
ColourRegisterT(&TrafficBackgroundColorID);
@@ -1179,7 +1179,7 @@ void CreateProtocolList(void)
for (i = 0; i < NumberOfAccounts; i++)
{
ProtoList[i].name = (char*)mir_alloc(mir_strlen(acc[i]->szModuleName) + 1);
- strcpy(ProtoList[i].name, acc[i]->szModuleName);
+ mir_strcpy(ProtoList[i].name, acc[i]->szModuleName);
ProtoList[i].tszAccountName = (TCHAR*)mir_alloc(sizeof(TCHAR) * (1 + mir_tstrlen(acc[i]->tszAccountName)));
_tcscpy(ProtoList[i].tszAccountName, acc[i]->tszAccountName);
//
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp
index 76f0f433df..127b89e4c1 100644
--- a/plugins/TrafficCounter/src/options.cpp
+++ b/plugins/TrafficCounter/src/options.cpp
@@ -193,7 +193,7 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
if ((options[i].dwFlag & OPTTREE_INVISIBLE) && !options[i].szSettingName)
{
options[i].szSettingName = (char*)mir_alloc(1 + mir_strlen(ProtoList[j].name));
- strcpy(options[i].szSettingName, ProtoList[j].name);
+ mir_strcpy(options[i].szSettingName, ProtoList[j].name);
size_t l = 20 + mir_tstrlen(ProtoList[j].tszAccountName);
options[i].szOptionName = (TCHAR*)mir_alloc(sizeof(TCHAR) * l);
mir_sntprintf(options[i].szOptionName, l, _T("Visible accounts/%s"), ProtoList[j].tszAccountName);
@@ -249,7 +249,7 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
// Íàñòðîéêè âèäèìîñòè ïðîòîêîëîâ
for (i = 0; i < NumberOfAccounts; i++) {
char buffer[32];
- strcpy(buffer, ProtoList[i].name);
+ mir_strcpy(buffer, ProtoList[i].name);
OptTree_SetOptions(hwndDlg, IDC_APPEARANCEOPTIONS, options, optionCount, ProtoList[i].Visible, buffer);
}
OptTree_SetOptions(hwndDlg, IDC_APPEARANCEOPTIONS, options, optionCount, unOptions.ShowOverall, "ShowOverall");
@@ -304,7 +304,7 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
for (i = 0; i < NumberOfAccounts; i++)
{
char buffer[32];
- strcpy(buffer, ProtoList[i].name);
+ mir_strcpy(buffer, ProtoList[i].name);
ProtoList[i].Visible = (BYTE)OptTree_GetOptions(hwndDlg, IDC_APPEARANCEOPTIONS, options, optionCount, buffer);
}
unOptions.ShowOverall = OptTree_GetOptions(hwndDlg, IDC_APPEARANCEOPTIONS, options, optionCount, "ShowOverall");
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
index f2082b398b..4bd3fad8f2 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -206,7 +206,7 @@ static void GetInitialDir(LPSTR pszInitialDir)
// is some standard path defined
if (!db_get_static(0, MODNAME, "vCardPath", szRelative, SIZEOF(szRelative))) {
if (!PathToAbsolute(szRelative, pszInitialDir))
- strcpy(pszInitialDir, szRelative);
+ mir_strcpy(pszInitialDir, szRelative);
}
else *pszInitialDir = 0;
}
diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
index 2692a3196f..27ba54d82a 100644
--- a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
+++ b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
@@ -134,7 +134,7 @@ TiXmlBase::StringToBuffer::StringToBuffer(const TIXML_STRING& str)
buffer = new char[ str.length()+1 ];
if (buffer)
{
- strcpy(buffer, str.c_str());
+ mir_strcpy(buffer, str.c_str());
}
}
@@ -1092,7 +1092,7 @@ bool TiXmlDocument::GetAsCharBuffer(char* buffer, size_t bufferSize)
}
else
{
- strcpy(buffer, data.c_str());
+ mir_strcpy(buffer, data.c_str());
return true;
}
}
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp
index 9aa4809852..f56a7fef85 100644
--- a/plugins/UserInfoEx/src/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/src/mir_menuitems.cpp
@@ -320,7 +320,7 @@ void RebuildGroup()
// create service name main (prevent to generate {(Null)/Ex-/Import Group} in db) and set pointer to end it
char text[200];
- strcpy(text, "UserInfo");
+ mir_strcpy(text, "UserInfo");
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = text;
@@ -417,7 +417,7 @@ void RebuildSubGroup()
// create service name main (prevent to generate {(Null)/Ex-/Import Group} in db) and set pointer to end it
char text[200];
- strcpy(text, "UserInfo");
+ mir_strcpy(text, "UserInfo");
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = text;
@@ -464,7 +464,7 @@ void RebuildSubGroup()
{ mi.hParentMenu = mhExIm;
// Export
- strcpy(tDest, "/ExportGroup"); //mi.pszService
+ mir_strcpy(tDest, "/ExportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export group");
mi.position = 1050200;
@@ -474,7 +474,7 @@ void RebuildSubGroup()
hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
// Import
- strcpy(tDest, "/ImportGroup"); //mi.pszService
+ mir_strcpy(tDest, "/ImportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import group");
mi.position = 1050300;
@@ -547,7 +547,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
// create service name main (account module name) and set pointer to end it
char text[ 200 ];
- strcpy( text, pcli->menuProtos[i].szProto);
+ mir_strcpy( text, pcli->menuProtos[i].szProto);
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = text;
@@ -593,7 +593,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
mi.hParentMenu = mhExIm;
// Export
- strcpy(tDest, "/ExportAccount"); //mi.pszService
+ mir_strcpy(tDest, "/ExportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
mi.pszName = LPGEN("&Export xml");
mi.position = 50200;
@@ -601,7 +601,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
hMenuItemAccount[mItems*i + item++] = Menu_AddStatusMenuItem(&mi);
// Import
- strcpy(tDest, "/ImportAccount"); //mi.pszService
+ mir_strcpy(tDest, "/ImportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
mi.pszName = LPGEN("&Import xml");
mi.position = 50300;
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index dd3246d2b7..495a1ec069 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -404,7 +404,7 @@ public:
_popupButtons[0].lchIcon = Skin_GetIcon(ICO_BTN_DOWNARROW);
_popupButtons[0].wParam = MAKEWORD(IDSKIP, BN_CLICKED);
_popupButtons[0].lParam = NULL;
- strcpy(_popupButtons[0].lpzTitle, MODNAME"/Hide");
+ mir_strcpy(_popupButtons[0].lpzTitle, MODNAME"/Hide");
// cancel button
_popupButtons[1].cbSize = sizeof(POPUPACTION);
@@ -412,7 +412,7 @@ public:
_popupButtons[1].lchIcon = Skin_GetIcon(ICO_BTN_CANCEL);
_popupButtons[1].wParam = MAKEWORD(IDCANCEL, BN_CLICKED);
_popupButtons[1].lParam = NULL;
- strcpy(_popupButtons[1].lpzTitle, MODNAME"/Cancel");
+ mir_strcpy(_popupButtons[1].lpzTitle, MODNAME"/Cancel");
}
/**
diff --git a/plugins/Watrack_MPD/src/main.cpp b/plugins/Watrack_MPD/src/main.cpp
index 3364662c6e..4324eb91d9 100755
--- a/plugins/Watrack_MPD/src/main.cpp
+++ b/plugins/Watrack_MPD/src/main.cpp
@@ -86,7 +86,7 @@ int Parser()
}
if(mir_strlen(tmp2) > 2)
{
- strcpy(tmp, "password ");
+ mir_strcpy(tmp, "password ");
strcat(tmp, tmp2);
strcat(tmp, "\n");
Netlib_Send(ghConnection, tmp, (int)mir_strlen(tmp), 0);
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 81175f2ea4..76f0bb70af 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -372,7 +372,7 @@ void wSetData(char **Data, const char *Value)
{
if (Value[0] != 0) {
char *newData = (char*)mir_alloc(mir_strlen(Value) + 3);
- strcpy(newData, Value);
+ mir_strcpy(newData, Value);
*Data = newData;
}
else *Data = "";
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index d63114cfe0..5e6573461f 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -188,7 +188,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
rq.rcDestRect = rc;
rq.rcClipRect = rc;
- strcpy(rq.szObjectID, "Main,ID=WeatherFrame");
+ mir_strcpy(rq.szObjectID, "Main,ID=WeatherFrame");
CallService(MS_SKIN_DRAWGLYPH, (WPARAM)&rq, 0);
}
@@ -342,8 +342,8 @@ void InitMwin(void)
ColourIDT colourid = {0};
colourid.cbSize = sizeof(ColourIDT);
- strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
- strcpy(colourid.setting, "ColorMwinFrame");
+ mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
+ mir_strcpy(colourid.setting, "ColorMwinFrame");
_tcscpy(colourid.name, LPGENT("Frame Background"));
_tcscpy(colourid.group, _T(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
@@ -352,10 +352,10 @@ void InitMwin(void)
FontIDT fontid = {0};
fontid.cbSize = sizeof(FontIDT);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
- strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
+ mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
_tcscpy(fontid.group, _T(WEATHERPROTONAME));
_tcscpy(fontid.name, LPGENT("Frame Font"));
- strcpy(fontid.prefix, "fnt0");
+ mir_strcpy(fontid.prefix, "fnt0");
HDC hdc = GetDC(NULL);
fontid.deffontsettings.size = -13;
@@ -369,7 +369,7 @@ void InitMwin(void)
fontid.deffontsettings.style = DBFONTF_BOLD;
_tcscpy(fontid.name, LPGENT("Frame Title Font"));
- strcpy(fontid.prefix, "fnt1");
+ mir_strcpy(fontid.prefix, "fnt1");
FontRegisterT(&fontid);
for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 56426a95e4..98e356aa69 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -50,35 +50,35 @@ void InitServices()
{
char SvcFunc[100];
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_GETCAPS);
CreateServiceFunction(SvcFunc, GetCaps);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_GETNAME);
CreateServiceFunction(SvcFunc, GetName);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_LOADICON);
CreateServiceFunction(SvcFunc, BPLoadIcon);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_SETSTATUS);
CreateServiceFunction(SvcFunc, SetStatus);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_GETSTATUS);
CreateServiceFunction(SvcFunc, GetStatus);
//
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_BASICSEARCH);
CreateServiceFunction(SvcFunc, BasicSearch);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PS_ADDTOLIST);
CreateServiceFunction(SvcFunc, AddToList);
- strcpy(SvcFunc, MODULENAME);
+ mir_strcpy(SvcFunc, MODULENAME);
strcat(SvcFunc, PSS_GETINFO);
CreateServiceFunction(SvcFunc, GetInfo);
}
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index 6982a6b8ef..8857e78d1a 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -76,7 +76,7 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
startposition = 0;
}
- strcpy(Searchstr, NewSearchstr);
+ mir_strcpy(Searchstr, NewSearchstr);
if (!(startposition > mir_strlen(buff)))
location = (strstr(buff + startposition, NewSearchstr)) - buff;
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp
index 5ffcd81274..30be9de484 100644
--- a/plugins/WhenWasIt/src/utils.cpp
+++ b/plugins/WhenWasIt/src/utils.cpp
@@ -81,11 +81,11 @@ char* BinToHex(int size, PBYTE data)
szresult = (char *) new char[maxSize];
memset(szresult, 0, maxSize);
mir_snprintf(buffer, SIZEOF(buffer), "%0*X", HEX_SIZE, size);
- strcpy(szresult, buffer);
+ mir_strcpy(szresult, buffer);
for (int i = 0; i < size; i++) {
mir_snprintf(buffer, SIZEOF(buffer), "%02X", data[i]);
- strcpy(szresult + (HEX_SIZE + i * 2), buffer);
+ mir_strcpy(szresult + (HEX_SIZE + i * 2), buffer);
}
return szresult;
}
@@ -93,7 +93,7 @@ char* BinToHex(int size, PBYTE data)
void HexToBin(char *inData, ULONG &size, LPBYTE &outData)
{
char buffer[32] = { 0 };
- strcpy(buffer, "0x");
+ mir_strcpy(buffer, "0x");
strncpy(buffer + 2, inData, HEX_SIZE);
sscanf(buffer, "%x", &size);
outData = (unsigned char*)new char[size * 2];
diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp
index 9114c061e1..ad9083f5b9 100644
--- a/plugins/YAMN/src/mails/mails.cpp
+++ b/plugins/YAMN/src/mails/mails.cpp
@@ -473,7 +473,7 @@ HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From)
Browser=Browser->Next;
}
Browser->ID=new char[mir_strlen(From->ID)+1];
- strcpy(Browser->ID,From->ID);
+ mir_strcpy(Browser->ID,From->ID);
Browser->Number=From->Number;
Browser->Flags=From->Flags;
}
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index 3941b2a270..30e60b8625 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -1042,25 +1042,25 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
if (NULL != ActualAccount->Name)
delete[] ActualAccount->Name;
ActualAccount->Name = new char[ mir_strlen(Text)+1];
- strcpy(ActualAccount->Name,Text);
+ mir_strcpy(ActualAccount->Name,Text);
GetDlgItemTextA(hDlg,IDC_EDITSERVER,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Name)
delete[] ActualAccount->Server->Name;
ActualAccount->Server->Name=new char[ mir_strlen(Text)+1];
- strcpy(ActualAccount->Server->Name,Text);
+ mir_strcpy(ActualAccount->Server->Name,Text);
GetDlgItemTextA(hDlg,IDC_EDITLOGIN,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Login)
delete[] ActualAccount->Server->Login;
ActualAccount->Server->Login=new char[ mir_strlen(Text)+1];
- strcpy(ActualAccount->Server->Login,Text);
+ mir_strcpy(ActualAccount->Server->Login,Text);
GetDlgItemTextA(hDlg,IDC_EDITPASS,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Passwd)
delete[] ActualAccount->Server->Passwd;
ActualAccount->Server->Passwd=new char[ mir_strlen(Text)+1];
- strcpy(ActualAccount->Server->Passwd,Text);
+ mir_strcpy(ActualAccount->Server->Passwd,Text);
GetDlgItemTextW(hDlg,IDC_EDITAPP,TextW,SIZEOF(TextW));
if (NULL != ActualAccount->NewMailN.App)
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index b7a64d9f4d..e91775973d 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -110,8 +110,8 @@ static void InitFonts()
font_id_firstline.flags = FIDF_ALLOWEFFECTS;
_tcscpy(font_id_firstline.group, LPGENT("Popups"));
_tcscpy(font_id_firstline.name, LPGENT("First line"));
- strcpy(font_id_firstline.dbSettingsGroup, MODULE);
- strcpy(font_id_firstline.prefix, "FontFirst");
+ mir_strcpy(font_id_firstline.dbSettingsGroup, MODULE);
+ mir_strcpy(font_id_firstline.prefix, "FontFirst");
_tcscpy(font_id_firstline.backgroundGroup, _T("Popups"));
_tcscpy(font_id_firstline.backgroundName, _T("Background"));
font_id_firstline.order = 0;
@@ -121,8 +121,8 @@ static void InitFonts()
font_id_secondline.flags = FIDF_ALLOWEFFECTS;
_tcscpy(font_id_secondline.group, LPGENT("Popups"));
_tcscpy(font_id_secondline.name, LPGENT("Second line"));
- strcpy(font_id_secondline.dbSettingsGroup, MODULE);
- strcpy(font_id_secondline.prefix, "FontSecond");
+ mir_strcpy(font_id_secondline.dbSettingsGroup, MODULE);
+ mir_strcpy(font_id_secondline.prefix, "FontSecond");
_tcscpy(font_id_secondline.backgroundGroup, _T("Popups"));
_tcscpy(font_id_secondline.backgroundName, _T("Background"));
font_id_secondline.order = 1;
@@ -132,8 +132,8 @@ static void InitFonts()
font_id_time.flags = FIDF_ALLOWEFFECTS;
_tcscpy(font_id_time.group, LPGENT("Popups"));
_tcscpy(font_id_time.name, LPGENT("Time"));
- strcpy(font_id_time.dbSettingsGroup, MODULE);
- strcpy(font_id_time.prefix, "FontTime");
+ mir_strcpy(font_id_time.dbSettingsGroup, MODULE);
+ mir_strcpy(font_id_time.prefix, "FontTime");
_tcscpy(font_id_time.backgroundGroup, _T("Popups"));
_tcscpy(font_id_time.backgroundName, _T("Background"));
font_id_time.order = 2;
@@ -142,8 +142,8 @@ static void InitFonts()
colour_id_bg.cbSize = sizeof(ColourIDT);
_tcscpy(colour_id_bg.group, LPGENT("Popups"));
_tcscpy(colour_id_bg.name, LPGENT("Background"));
- strcpy(colour_id_bg.dbSettingsGroup, MODULE);
- strcpy(colour_id_bg.setting, "ColourBg");
+ mir_strcpy(colour_id_bg.dbSettingsGroup, MODULE);
+ mir_strcpy(colour_id_bg.setting, "ColourBg");
colour_id_bg.defcolour = GetSysColor(COLOR_3DSHADOW);
colour_id_bg.order = 0;
ColourRegisterT(&colour_id_bg);
@@ -151,8 +151,8 @@ static void InitFonts()
colour_id_border.cbSize = sizeof(ColourIDT);
_tcscpy(colour_id_border.group, LPGENT("Popups"));
_tcscpy(colour_id_border.name, LPGENT("Border"));
- strcpy(colour_id_border.dbSettingsGroup, MODULE);
- strcpy(colour_id_border.setting, "ColourBorder");
+ mir_strcpy(colour_id_border.dbSettingsGroup, MODULE);
+ mir_strcpy(colour_id_border.setting, "ColourBorder");
colour_id_border.defcolour = RGB(0, 0, 0);
colour_id_border.order = 1;
ColourRegisterT(&colour_id_border);
@@ -160,8 +160,8 @@ static void InitFonts()
colour_id_sidebar.cbSize = sizeof(ColourIDT);
_tcscpy(colour_id_sidebar.group, LPGENT("Popups"));
_tcscpy(colour_id_sidebar.name, LPGENT("Sidebar"));
- strcpy(colour_id_sidebar.dbSettingsGroup, MODULE);
- strcpy(colour_id_sidebar.setting, "ColourSidebar");
+ mir_strcpy(colour_id_sidebar.dbSettingsGroup, MODULE);
+ mir_strcpy(colour_id_sidebar.setting, "ColourSidebar");
colour_id_sidebar.defcolour = RGB(128, 128, 128);
colour_id_sidebar.order = 2;
ColourRegisterT(&colour_id_sidebar);
@@ -169,8 +169,8 @@ static void InitFonts()
colour_id_titleunderline.cbSize = sizeof(ColourIDT);
_tcscpy(colour_id_titleunderline.group, LPGENT("Popups"));
_tcscpy(colour_id_titleunderline.name, LPGENT("Title underline"));
- strcpy(colour_id_titleunderline.dbSettingsGroup, MODULE);
- strcpy(colour_id_titleunderline.setting, "ColourTitleUnderline");
+ mir_strcpy(colour_id_titleunderline.dbSettingsGroup, MODULE);
+ mir_strcpy(colour_id_titleunderline.setting, "ColourTitleUnderline");
colour_id_titleunderline.defcolour = GetSysColor(COLOR_3DSHADOW);
colour_id_titleunderline.order = 3;
ColourRegisterT(&colour_id_titleunderline);
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp
index 36506bf4f2..67a80646e6 100644
--- a/plugins/YahooGroups/src/utils.cpp
+++ b/plugins/YahooGroups/src/utils.cpp
@@ -103,12 +103,12 @@ char *BinToHex(int size, PBYTE data)
szresult = (char *) new char[ maxSize ];
memset(szresult, 0, maxSize);
mir_snprintf(buffer, SIZEOF(buffer), "%0*X", HEX_SIZE, size);
- strcpy(szresult, buffer);
+ mir_strcpy(szresult, buffer);
int i;
for (i = 0; i < size; i++)
{
mir_snprintf(buffer, SIZEOF(buffer), "%02X", data[i]);
- strcpy(szresult + (HEX_SIZE + i * 2), buffer);
+ mir_strcpy(szresult + (HEX_SIZE + i * 2), buffer);
}
return szresult;
}
@@ -116,7 +116,7 @@ char *BinToHex(int size, PBYTE data)
void HexToBin(char *inData, ULONG &size, LPBYTE &outData)
{
char buffer[32] = {0};
- strcpy(buffer, "0x");
+ mir_strcpy(buffer, "0x");
strncpy(buffer + 2, inData, HEX_SIZE);
sscanf(buffer, "%x", &size);
outData = (unsigned char*)new char[size*2];
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);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index fbe092784a..af5483841d 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -412,13 +412,13 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam)
*(DWORD*)dbei.pBlob = 0;
BYTE* p = dbei.pBlob + sizeof(DWORD);
for (int i = 0; i < pre->fileCount; i++) {
- strcpy((char*)p, pszFiles[i]);
+ mir_strcpy((char*)p, pszFiles[i]);
p += mir_strlen(pszFiles[i]) + 1;
if (bUnicode)
mir_free(pszFiles[i]);
}
- strcpy((char*)p, (szDescr == NULL) ? "" : szDescr);
+ mir_strcpy((char*)p, (szDescr == NULL) ? "" : szDescr);
if (bUnicode)
mir_free(szDescr);
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index f3e13ccd9d..4852cf91d1 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -85,7 +85,7 @@ static int AppendToBufferWithRTF(char *&buffer, size_t &cbBufferEnd, size_t &cbB
}
d = buffer + cbBufferEnd;
- strcpy(d, "{\\uc1 ");
+ mir_strcpy(d, "{\\uc1 ");
d += 6;
for (; *line; line++, textCharsCount++) {
@@ -482,8 +482,8 @@ void StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend)
SendMessage(hwndLog, EM_EXSETSEL, 0, (LPARAM)& sel);
}
- strcpy(szSep2, fAppend ? "\\par\\sl0" : "\\sl1000");
- strcpy(szSep2_RTL, fAppend ? "\\rtlpar\\rtlmark\\par\\sl1000" : "\\sl1000");
+ mir_strcpy(szSep2, fAppend ? "\\par\\sl0" : "\\sl1000");
+ mir_strcpy(szSep2_RTL, fAppend ? "\\rtlpar\\rtlmark\\par\\sl1000" : "\\sl1000");
SendMessage(hwndLog, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SF_RTF, (LPARAM)& stream);
if (bottomScroll) {
@@ -545,7 +545,7 @@ void LoadMsgLogIcons(void)
char *szDest = pLogIconBmpBits[i] + rtfHeaderSize;
bin2hex(&bih, sizeof(bih), szDest); szDest += sizeof(bih) * 2;
bin2hex(pBmpBits, widthBytes * bih.biHeight, szDest); szDest += widthBytes * bih.biHeight * 2;
- strcpy(szDest, "}");
+ mir_strcpy(szDest, "}");
logIconBmpSize[i] = size_t(szDest - pLogIconBmpBits[i]) + 1;
}
diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp
index 9be458b09d..9fc6d5b20a 100644
--- a/src/modules/chat/log.cpp
+++ b/src/modules/chat/log.cpp
@@ -509,7 +509,7 @@ void LoadMsgLogBitmaps(void)
char *szDest = pLogIconBmpBits[i] + rtfHeaderSize;
bin2hex(&bih, sizeof(bih), szDest); szDest += sizeof(bih) * 2;
bin2hex(pBmpBits, widthBytes * bih.biHeight, szDest); szDest += widthBytes * bih.biHeight * 2;
- strcpy(szDest, "}");
+ mir_strcpy(szDest, "}");
logIconBmpSize[i] = size_t(szDest - pLogIconBmpBits[i]) + 1;
}
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp
index 2f04fe4c1e..0d3adeabbf 100644
--- a/src/modules/clist/contacts.cpp
+++ b/src/modules/clist/contacts.cpp
@@ -194,7 +194,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam)
size_t len = mir_strlen(dbv.pszVal) + mir_strlen(dbv2.pszVal) + 2;
char* buf = (char*)mir_alloc(len);
if (buf != NULL)
- strcat(strcat(strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
+ strcat(strcat(mir_strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
ci->pszVal = (TCHAR*)buf;
}
db_free(&dbv);
@@ -319,7 +319,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam)
size_t len = mir_strlen(dbv.pszVal) + mir_strlen(dbv2.pszVal) + 2;
char* buf = (char*)mir_alloc(len);
if (buf != NULL)
- strcat(strcat(strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
+ strcat(strcat(mir_strcpy(buf, dbv.pszVal), " "), dbv2.pszVal);
ci->pszVal = (TCHAR*)buf;
}
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp
index 14eecc97ec..ffc9631d77 100644
--- a/src/modules/database/mdatabasecache.cpp
+++ b/src/modules/database/mdatabasecache.cpp
@@ -121,7 +121,7 @@ char* MDatabaseCache::InsertCachedSetting(const char* szName, int cbLen)
{
char* newValue = (char*)HeapAlloc(m_hCacheHeap, 0, cbLen);
*newValue++ = 0;
- strcpy(newValue, szName);
+ mir_strcpy(newValue, szName);
m_lSettings.insert(newValue);
return newValue;
}
@@ -131,9 +131,9 @@ char* MDatabaseCache::GetCachedSetting(const char *szModuleName, const char *szS
char szFullName[512];
const char *szKey;
if (szModuleName != NULL) {
- strcpy(szFullName, szModuleName);
+ mir_strcpy(szFullName, szModuleName);
szFullName[moduleNameLen] = '/';
- strcpy(szFullName + moduleNameLen + 1, szSettingName);
+ mir_strcpy(szFullName + moduleNameLen + 1, szSettingName);
szKey = szFullName;
}
else szKey = szSettingName;
@@ -160,7 +160,7 @@ void MDatabaseCache::SetCachedVariant(DBVARIANT* s /* new */, DBVARIANT* d /* ca
d->pszVal = (char*)HeapReAlloc(m_hCacheHeap, 0, szSave, mir_strlen(s->pszVal) + 1);
else
d->pszVal = (char*)HeapAlloc(m_hCacheHeap, 0, mir_strlen(s->pszVal) + 1);
- strcpy(d->pszVal, s->pszVal);
+ mir_strcpy(d->pszVal, s->pszVal);
}
else if (szSave != NULL)
HeapFree(m_hCacheHeap, 0, szSave);
diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp
index 0fa5d91f42..cd7a173f1a 100644
--- a/src/modules/netlib/netlibhttp.cpp
+++ b/src/modules/netlib/netlibhttp.cpp
@@ -584,7 +584,7 @@ INT_PTR NetlibHttpSendRequest(WPARAM wParam, LPARAM lParam)
nlc->szNewUrl = (char*)mir_realloc(nlc->szNewUrl, rlen + mir_strlen(tmpUrl) * 3 + 1);
strncpy(nlc->szNewUrl, pszFullUrl, rlen);
- strcpy(nlc->szNewUrl + rlen, tmpUrl);
+ mir_strcpy(nlc->szNewUrl + rlen, tmpUrl);
pszFullUrl = nlc->szNewUrl;
pszUrl = NULL;
diff --git a/src/modules/protocols/protodir.cpp b/src/modules/protocols/protodir.cpp
index 0ce11742ed..672fb7f007 100644
--- a/src/modules/protocols/protodir.cpp
+++ b/src/modules/protocols/protodir.cpp
@@ -108,7 +108,7 @@ char * contactDir_Proto_Add(contactDir * cd, char * proto)
if ( List_GetIndex(&cd->protoNameCache, proto, &index) ) szCache = cd->protoNameCache.items[index];
else {
szCache = HeapAlloc(hCacheHeap, HEAP_NO_SERIALIZE, mir_strlen(proto)+1);
- strcpy(szCache, proto);
+ mir_strcpy(szCache, proto);
List_Insert(&cd->protoNameCache, szCache, index);
}
return szCache;
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 8fb4ed3e98..0a9c1123ad 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -108,7 +108,7 @@ TCHAR *GetContactID(MCONTACT hContact)
static __forceinline int _xcscmp(const char *s1, const char *s2) { return mir_strcmp(s1, s2); }
static __forceinline int _xcsncmp(const char *s1, const char *s2, size_t n) { return strncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const char *s1) { return mir_strlen(s1); }
-static __forceinline char *_xcscpy(char *s1, const char *s2) { return strcpy(s1, s2); }
+static __forceinline char *_xcscpy(char *s1, const char *s2) { return mir_strcpy(s1, s2); }
static __forceinline char *_xcsncpy(char *s1, const char *s2, size_t n) { return strncpy(s1, s2, n); }
static __forceinline char *_xstrselect(char *, char *s1, TCHAR *s2) { return s1; }
static __forceinline char *_itox(char *, int a) { return itoa(a, (char *)mir_alloc(sizeof(char)*20), 10); }
diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp
index 61b5bb6f58..79eb1fc6e1 100644
--- a/src/modules/xml/xmlParser.cpp
+++ b/src/modules/xml/xmlParser.cpp
@@ -246,7 +246,7 @@ static inline int xstricmp(XMLCSTR c1, XMLCSTR c2) { return _stricmp(c1, c2); }
#endif
static inline int xstrncmp(XMLCSTR c1, XMLCSTR c2, int l) { return strncmp(c1, c2, l);}
static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return (XMLSTR)strstr(c1, c2); }
-static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)strcpy(c1, c2); }
+static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)mir_strcpy(c1, c2); }
#endif
#else
// for gcc and CC
@@ -330,7 +330,7 @@ static inline int xstrnicmp(XMLCSTR c1, XMLCSTR c2, int l) { return strncasecmp(
static inline int xstrncmp(XMLCSTR c1, XMLCSTR c2, int l) { return strncmp(c1, c2, l);}
static inline int xstricmp(XMLCSTR c1, XMLCSTR c2) { return strcasecmp(c1, c2); }
static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return (XMLSTR)strstr(c1, c2); }
-static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)strcpy(c1, c2); }
+static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)mir_strcpy(c1, c2); }
#endif
static inline int _strnicmp(const char *c1, const char *c2, int l) { return strncasecmp(c1, c2, l);}
#endif