summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-23 17:01:01 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-23 17:01:01 +0000
commitd5ee0fc23bdc1a194774591eb4ce63b8bebb8d6e (patch)
tree47da9333297ad6bd11d88762adba1ad5d55fa940 /protocols/Gadu-Gadu
parentab13aa962b5064fe85ec0562c04d16e8920e92e0 (diff)
replace strncat to mir_strncat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13780 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/filetransfer.cpp12
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp42
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp2
4 files changed, 29 insertions, 29 deletions
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp
index 7cf7f5f319..3d23d0a9a5 100644
--- a/protocols/Gadu-Gadu/src/filetransfer.cpp
+++ b/protocols/Gadu-Gadu/src/filetransfer.cpp
@@ -270,7 +270,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
PROTOFILETRANSFERSTATUS pfts;
local_dcc->tick = tick;
strncpy(filename, local_dcc->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc->contact;
@@ -301,7 +301,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
{
PROTOFILETRANSFERSTATUS pfts;
strncpy(filename, local_dcc->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc->contact;
@@ -500,7 +500,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
PROTOFILETRANSFERSTATUS pfts;
local_dcc7->tick = tick;
strncpy(filename, local_dcc7->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc7->contact;
@@ -531,7 +531,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
{
PROTOFILETRANSFERSTATUS pfts;
strncpy(filename, local_dcc7->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc7->contact;
@@ -667,7 +667,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
struct gg_dcc *dcc = (struct gg_dcc *) hTransfer;
char fileName[MAX_PATH], *path = mir_t2a(szPath);
strncpy(fileName, path, sizeof(fileName));
- strncat(fileName, (char*)dcc->file_info.filename, sizeof(fileName) - mir_strlen(fileName));
+ mir_strncat(fileName, (char*)dcc->file_info.filename, sizeof(fileName) - mir_strlen(fileName));
dcc->folder = _strdup((char *) path);
dcc->tick = 0;
mir_free(path);
@@ -709,7 +709,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
char fileName[MAX_PATH], *path = mir_t2a(szPath);
int iFtRemoveRes;
strncpy(fileName, path, sizeof(fileName));
- strncat(fileName, (char*)dcc7->filename, sizeof(fileName) - mir_strlen(fileName));
+ mir_strncat(fileName, (char*)dcc7->filename, sizeof(fileName) - mir_strlen(fileName));
dcc7->folder = _strdup((char *) path);
dcc7->tick = 0;
mir_free(path);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 2b6d0db04a..34f27f4514 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -328,25 +328,25 @@ HANDLE GGPROTO::SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName,
{
T2Utf nick_utf8(nick);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, nick_utf8);
- strncat(data, nick_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, nick_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (firstName)
{
T2Utf firstName_utf8(firstName);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, firstName_utf8);
- strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (lastName)
{
T2Utf lastName_utf8(lastName);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, lastName_utf8);
- strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
// Count crc & check if the data was equal if yes do same search with shift
crc = crc_get(data);
@@ -402,36 +402,36 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
{
T2Utf firstName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, firstName_utf8);
- strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 1 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 1 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf lastName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, lastName_utf8);
- strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 2 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 2 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf nickName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, nickName_utf8);
- strncat(data, nickName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, nickName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 3 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 3 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf city_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_CITY, city_utf8);
- strncat(data, city_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, city_utf8, sizeof(data) - mir_strlen(data));
}
- /* 4 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 4 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_AGEFROM, text, SIZEOF(text));
if (mir_tstrlen(text))
@@ -459,29 +459,29 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
T2Utf age_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, age_utf8);
- strncat(data, age_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, age_utf8, sizeof(data) - mir_strlen(data));
}
- /* 5 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 5 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
switch(SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_GETCURSEL, 0, 0))
{
case 1:
gg_pubdir50_add(req, GG_PUBDIR50_GENDER, GG_PUBDIR50_GENDER_FEMALE);
- strncat(data, GG_PUBDIR50_GENDER_MALE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_GENDER_MALE, sizeof(data) - mir_strlen(data));
break;
case 2:
gg_pubdir50_add(req, GG_PUBDIR50_GENDER, GG_PUBDIR50_GENDER_MALE);
- strncat(data, GG_PUBDIR50_GENDER_FEMALE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_GENDER_FEMALE, sizeof(data) - mir_strlen(data));
break;
}
- /* 6 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 6 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (IsDlgButtonChecked(hwndDlg, IDC_ONLYCONNECTED))
{
gg_pubdir50_add(req, GG_PUBDIR50_ACTIVE, GG_PUBDIR50_ACTIVE_TRUE);
- strncat(data, GG_PUBDIR50_ACTIVE_TRUE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_ACTIVE_TRUE, sizeof(data) - mir_strlen(data));
}
- /* 7 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 7 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
// No data entered
if (mir_strlen(data) <= 7 || (mir_strlen(data) == 8 && IsDlgButtonChecked(hwndDlg, IDC_ONLYCONNECTED))) return (HWND)0;
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index f949bd7479..7990753277 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -228,7 +228,7 @@ char *oauth_generate_nonce()
int strSizeB = int(mir_strlen(timestamp) + sizeof(randnum));
ptrA str((char *)mir_calloc(strSizeB + 1));
mir_strcpy(str, timestamp);
- strncat(str, randnum, sizeof(randnum));
+ mir_strncat(str, randnum, sizeof(randnum));
BYTE digest[16];
mir_md5_hash((BYTE*)(char*)str, strSizeB, digest);
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index af998847a4..d0f442d872 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -43,7 +43,7 @@ char *gg_status2db(int status, const char *suffix)
default: return NULL;
}
strncpy(str, prefix, sizeof(str));
- strncat(str, suffix, sizeof(str) - mir_strlen(str));
+ mir_strncat(str, suffix, sizeof(str) - mir_strlen(str));
return str;
}