From babf7873a3fe373d60ef22b1b671d98e014d8819 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 19:52:29 +0000 Subject: replace strcpy to mir_strcpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/services.cpp | 2 +- plugins/Alarms/src/alarm_win.cpp | 12 ++--- plugins/Alarms/src/frame.cpp | 8 ++-- plugins/AssocMgr/src/test.cpp | 4 +- plugins/BASS_interface/src/Main.cpp | 4 +- plugins/ChangeKeyboardLayout/src/hook_events.cpp | 2 +- plugins/ClientChangeNotify/src/Common.h | 2 +- plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 2 +- plugins/Clist_nicer/src/clcitems.cpp | 2 +- plugins/Clist_nicer/src/extBackg.cpp | 54 +++++++++++----------- plugins/CmdLine/MimCmd/src/commands.cpp | 2 +- plugins/CmdLine/src/mimcmd_handlers.cpp | 6 +-- plugins/CmdLine/src/utils.cpp | 2 +- plugins/ContactsPlus/src/utils.cpp | 2 +- plugins/CrashDumper/src/upload.cpp | 2 +- .../CyrTranslit/src/TransliterationProtocol.cpp | 2 +- plugins/Db3x_mmap/src/database.cpp | 2 +- plugins/Db3x_mmap/src/dbmodulechain.cpp | 2 +- plugins/Db3x_mmap/src/dbsettings.cpp | 4 +- plugins/DbEditorPP/src/addeditsettingsdlg.cpp | 2 +- plugins/DbEditorPP/src/exportimport.cpp | 8 ++-- plugins/DbEditorPP/src/settinglist.cpp | 4 +- plugins/DbEditorPP/src/watchedvars.cpp | 2 +- plugins/Dropbox/src/dropbox_transfers.cpp | 2 +- plugins/Exchange/src/MirandaExchange.cpp | 2 +- plugins/FTPFileYM/src/dbentry.cpp | 6 +-- plugins/FTPFileYM/src/job_generic.cpp | 2 +- plugins/FTPFileYM/src/job_upload.cpp | 2 +- plugins/FTPFileYM/src/mir_db.cpp | 2 +- plugins/FTPFileYM/src/utils.cpp | 6 +-- plugins/HTTPServer/src/FileShareNode.cpp | 6 +-- plugins/HTTPServer/src/GuiElements.cpp | 10 ++-- plugins/HTTPServer/src/HttpUser.cpp | 6 +-- plugins/HTTPServer/src/IndexHTML.cpp | 8 ++-- plugins/HTTPServer/src/IndexXML.cpp | 8 ++-- plugins/HTTPServer/src/MimeHandling.cpp | 6 +-- plugins/HTTPServer/src/main.cpp | 10 ++-- plugins/IEView/src/Options.cpp | 38 +++++++-------- plugins/IEView/src/ScriverHTMLBuilder.cpp | 4 +- plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 4 +- plugins/IEView/src/TemplateHTMLBuilder.cpp | 4 +- plugins/Import/src/import.cpp | 2 +- plugins/KeyboardNotify/src/main.cpp | 2 +- plugins/MenuItemEx/src/main.cpp | 2 +- plugins/MirOTR/src/svcs_proto.cpp | 2 +- plugins/NewAwaySysMod/src/Common.h | 2 +- plugins/New_GPG/src/main.cpp | 28 +++++------ plugins/New_GPG/src/messages.cpp | 10 ++-- plugins/New_GPG/src/options.cpp | 10 ++-- plugins/New_GPG/src/utilities.cpp | 12 ++--- plugins/Non-IM Contact/src/contactinfo.cpp | 16 +++---- plugins/Non-IM Contact/src/files.cpp | 6 +-- plugins/Non-IM Contact/src/main.cpp | 2 +- plugins/Non-IM Contact/src/namereplacing.cpp | 12 ++--- plugins/NotesAndReminders/src/notes.cpp | 2 +- plugins/NotifyAnything/src/main.cpp | 2 +- plugins/Popup/src/font.h | 2 +- plugins/RecentContacts/src/RecentContacts.cpp | 2 +- plugins/RemovePersonalSettings/src/rps.cpp | 10 ++-- plugins/Scriver/src/msglog.cpp | 8 ++-- plugins/SecureIM/src/crypt_lists.cpp | 4 +- plugins/SecureIM/src/mmi.cpp | 6 +-- plugins/SecureIM/src/options.cpp | 2 +- plugins/SecureIM/src/splitmsg.cpp | 2 +- plugins/SecureIM/src/svcs_proto.cpp | 4 +- plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp | 2 +- plugins/SendScreenshotPlus/src/mir_string.cpp | 2 +- plugins/Sessions/Src/Utils.cpp | 4 +- plugins/SmileyAdd/src/download.cpp | 2 +- plugins/Spamotron/src/bayes.cpp | 2 +- plugins/Spamotron/src/spamotron.cpp | 2 +- plugins/Spamotron/src/utils.cpp | 2 +- .../StatusPlugins/AdvancedAutoAway/msgoptions.cpp | 2 +- plugins/StatusPlugins/StartupStatus/options.cpp | 8 ++-- plugins/TipperYM/src/options.cpp | 4 +- plugins/TipperYM/src/tipper.cpp | 36 +++++++-------- plugins/TopToolBar/src/common.h | 2 +- plugins/TrafficCounter/src/TrafficCounter.cpp | 10 ++-- plugins/TrafficCounter/src/options.cpp | 6 +-- .../src/ex_import/dlg_ExImOpenSaveFile.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinyxml.cpp | 4 +- plugins/UserInfoEx/src/mir_menuitems.cpp | 14 +++--- plugins/UserInfoEx/src/svc_refreshci.cpp | 4 +- plugins/Watrack_MPD/src/main.cpp | 2 +- plugins/Weather/src/weather_data.cpp | 2 +- plugins/Weather/src/weather_mwin.cpp | 12 ++--- plugins/WebView/src/main.cpp | 16 +++---- plugins/WebView/src/webview_datawnd.cpp | 2 +- plugins/WhenWasIt/src/utils.cpp | 6 +-- plugins/YAMN/src/mails/mails.cpp | 2 +- plugins/YAMN/src/proto/pop3/pop3opt.cpp | 8 ++-- plugins/YAPP/src/yapp.cpp | 28 +++++------ plugins/YahooGroups/src/utils.cpp | 6 +-- 93 files changed, 300 insertions(+), 300 deletions(-) (limited to 'plugins') 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(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(mir_alloc(txtUTF.length())); - strcpy(reinterpret_cast(ccs->lParam), txtUTF.c_str()); + mir_strcpy(reinterpret_cast(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, '&', "&"); 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, '&', "&"); 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< 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, "\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]; -- cgit v1.2.3