diff options
author | Mataes <mataes2007@gmail.com> | 2018-03-31 12:43:21 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-03-31 12:43:21 +0300 |
commit | 44ac196462f6149c0d8355dfecebcef50a6ba2d8 (patch) | |
tree | 05c5e31a4b28888da59b9c84dbac55cff6d1d4b8 /plugins/IEView/src/Options.cpp | |
parent | 3a4438c3313a2c2778d5637f1dd22ca40219b1a3 (diff) |
IEView: mir_strcpy and mir_wstrcpy replaced to strncpy_s and wcsncpy_s
Diffstat (limited to 'plugins/IEView/src/Options.cpp')
-rw-r--r-- | plugins/IEView/src/Options.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 5ca9fa0496..67584dad16 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)
- mir_strcpy(protoName, Translate("Default"));
+ strncpy_s(protoName, Translate("Default"), _TRUNCATE);
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, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1515,7 +1515,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1524,7 +1524,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
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, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1548,7 +1548,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1557,7 +1557,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
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, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1581,7 +1581,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1590,7 +1590,7 @@ void Options::init() }
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
- mir_strcpy(tmpPath, dbv.pszVal);
+ strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
db_free(&dbv);
@@ -1691,17 +1691,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- mir_strcpy(tmpPath, proto->getSRMMBackgroundFilename());
+ strncpy_s(tmpPath, proto->getSRMMBackgroundFilename(), _TRUNCATE);
PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- mir_strcpy(tmpPath, proto->getSRMMCssFilename());
+ strncpy_s(tmpPath, proto->getSRMMCssFilename(), _TRUNCATE);
PathToRelative(proto->getSRMMCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- mir_strcpy(tmpPath, proto->getSRMMTemplateFilename());
+ strncpy_s(tmpPath, proto->getSRMMTemplateFilename(), _TRUNCATE);
PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1713,17 +1713,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- mir_strcpy(tmpPath, proto->getChatBackgroundFilename());
+ strncpy_s(tmpPath, proto->getChatBackgroundFilename(), _TRUNCATE);
PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- mir_strcpy(tmpPath, proto->getChatCssFilename());
+ strncpy_s(tmpPath, proto->getChatCssFilename(), _TRUNCATE);
PathToRelative(proto->getChatCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- mir_strcpy(tmpPath, proto->getChatTemplateFilename());
+ strncpy_s(tmpPath, proto->getChatTemplateFilename(), _TRUNCATE);
PathToRelative(proto->getChatTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1735,17 +1735,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- mir_strcpy(tmpPath, proto->getHistoryBackgroundFilename());
+ strncpy_s(tmpPath, proto->getHistoryBackgroundFilename(), _TRUNCATE);
PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- mir_strcpy(tmpPath, proto->getHistoryCssFilename());
+ strncpy_s(tmpPath, proto->getHistoryCssFilename(), _TRUNCATE);
PathToRelative(proto->getHistoryCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- mir_strcpy(tmpPath, proto->getHistoryTemplateFilename());
+ strncpy_s(tmpPath, proto->getHistoryTemplateFilename(), _TRUNCATE);
PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
|