diff options
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r-- | plugins/SecureIM/src/commonheaders.cpp | 4 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_lists.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/main.cpp | 8 | ||||
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 8 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_proto.cpp | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 6a5044482a..eca5257814 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -28,7 +28,7 @@ LPSTR myDBGetStringDecode(MCONTACT hContact, const char *szModule, const char *s if (!val) return NULL;
size_t len = mir_strlen(val) + 64;
char *buf = (LPSTR)mir_alloc(len);
- mir_strncpy(buf, val, len); mir_free(val);
+ strncpy(buf, val, len); mir_free(val);
return buf;
}
@@ -36,7 +36,7 @@ int myDBWriteStringEncode(MCONTACT hContact, const char *szModule, const char *s {
int len = (int)mir_strlen(val) + 64;
char *buf = (LPSTR)alloca(len);
- mir_strncpy(buf, val, len);
+ strncpy(buf, val, len);
int ret = db_set_s(hContact, szModule, szSetting, buf);
return ret;
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 29db82daed..28557fd1af 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -30,7 +30,7 @@ void loadSupportedProtocols() SupPro *p = (SupPro*)mir_calloc(sizeof(SupPro));
p->name = mir_strdup(protos[i]->szModuleName);
if (szNames && p->name) {
- char tmp[128]; mir_strncpy(tmp, p->name, sizeof(tmp) - 1); mir_strncat(tmp, ":", SIZEOF(tmp) - mir_strlen(tmp));
+ char tmp[128]; strncpy(tmp, p->name, sizeof(tmp) - 1); mir_strncat(tmp, ":", SIZEOF(tmp) - mir_strlen(tmp));
LPSTR szName = strstr(szNames, tmp);
if (szName) {
szName = strchr(szName, ':');
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index a3b37f6819..6d3362a52a 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -130,11 +130,11 @@ static int onModulesLoaded(WPARAM, LPARAM) else {
LPSTR tmp = db_get_sa(0, MODULENAME, "pgpPubRing");
if (tmp) {
- mir_strncpy(PubRingPath, tmp, sizeof(PubRingPath));
+ strncpy(PubRingPath, tmp, sizeof(PubRingPath));
mir_free(tmp);
}
if (tmp = db_get_sa(0, MODULENAME, "pgpSecRing")) {
- mir_strncpy(SecRingPath, tmp, sizeof(SecRingPath));
+ strncpy(SecRingPath, tmp, sizeof(SecRingPath));
mir_free(tmp);
}
if (PubRingPath[0] && SecRingPath[0]) {
@@ -163,11 +163,11 @@ static int onModulesLoaded(WPARAM, LPARAM) LPSTR tmp = db_get_sa(0, MODULENAME, "gpgExec");
if (tmp) {
- mir_strncpy(gpgexec, tmp, sizeof(gpgexec)-1);
+ strncpy(gpgexec, tmp, sizeof(gpgexec)-1);
mir_free(tmp);
}
if (tmp = db_get_sa(0, MODULENAME, "gpgHome")) {
- mir_strncpy(gpghome, tmp, sizeof(gpghome)-1);
+ strncpy(gpghome, tmp, sizeof(gpghome)-1);
mir_free(tmp);
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 5f95f66817..157ac96f8d 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1400,14 +1400,14 @@ void setListViewIcon(HWND hLV, UINT iItem, pUinKey ptr) void setListViewMode(HWND hLV, UINT iItem, UINT iMode)
{
char tmp[256];
- mir_strncpy(tmp, Translate(sim231[iMode]), sizeof(tmp)-1);
+ strncpy(tmp, Translate(sim231[iMode]), sizeof(tmp)-1);
LV_SetItemTextA(hLV, iItem, 2, tmp);
}
void setListViewStatus(HWND hLV, UINT iItem, UINT iStatus)
{
char tmp[128];
- mir_strncpy(tmp, Translate(sim232[iStatus]), sizeof(tmp)-1);
+ strncpy(tmp, Translate(sim232[iStatus]), sizeof(tmp)-1);
LV_SetItemTextA(hLV, iItem, 3, tmp);
}
@@ -1421,7 +1421,7 @@ UINT getListViewPSK(HWND hLV, UINT iItem) void setListViewPSK(HWND hLV, UINT iItem, UINT iStatus)
{
char str[128];
- mir_strncpy(str, (iStatus) ? Translate(sim206) : "-", sizeof(str)-1);
+ strncpy(str, (iStatus) ? Translate(sim206) : "-", sizeof(str)-1);
LV_SetItemTextA(hLV, iItem, 4, str);
}
@@ -1435,7 +1435,7 @@ UINT getListViewPUB(HWND hLV, UINT iItem) void setListViewPUB(HWND hLV, UINT iItem, UINT iStatus)
{
char str[128];
- mir_strncpy(str, (iStatus) ? Translate(sim233) : "-", sizeof(str)-1);
+ strncpy(str, (iStatus) ? Translate(sim233) : "-", sizeof(str)-1);
LV_SetItemTextA(hLV, iItem, 4, str);
LPSTR sha = NULL;
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index bdfe43dfcd..e254f7b81e 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -865,7 +865,7 @@ int __cdecl onProtoAck(WPARAM wParam, LPARAM lParam) LPSTR p = strrchr(file_out, '.');
LPSTR x = strrchr(file_out, '\\');
if (p > x) {
- mir_strncpy(buf, p, sizeof(buf)-1);
+ strncpy(buf, p, sizeof(buf)-1);
pos = p;
}
for (int i = 1; i < 10000; i++) {
|