diff options
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/oauth.cpp | 16 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/token.cpp | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index a0dbc4101c..37a106802a 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -152,7 +152,7 @@ void GGPROTO::requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL) if (avatar_transfers.getIndex((GGGETAVATARDATA*)&hContact) == -1) {
GGGETAVATARDATA *data = (GGGETAVATARDATA*)mir_alloc(sizeof(GGGETAVATARDATA) + mir_strlen(szAvatarURL)+1);
data->hContact = hContact;
- data->szAvatarURL = strcpy((char*)(data+1), szAvatarURL);
+ data->szAvatarURL = mir_strcpy((char*)(data+1), szAvatarURL);
avatar_transfers.insert(data);
}
gg_LeaveCriticalSection(&avatar_mutex, "requestAvatarTransfer", 1, 1, "avatar_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 5ace2600c9..1c57a0b590 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -190,7 +190,7 @@ void GGPROTO::checknewuser(uin_t uin, const char* passwd) oldpasswd[0] = '\0'; if (!getString(GG_KEY_PASSWORD, &dbv)) { - if (dbv.pszVal) strcpy(oldpasswd, dbv.pszVal); + if (dbv.pszVal) mir_strcpy(oldpasswd, dbv.pszVal); db_free(&dbv); } diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 9a7a880e50..95e9446ca6 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -175,7 +175,7 @@ void GGPROTO::parsecontacts(char *contacts) {
strPhone = (char*)malloc((n - p) + 5);
strncpy(strPhone, p, (n - p));
- strcpy((strPhone + (n - p)), " SMS"); // Add SMS postfix
+ mir_strcpy((strPhone + (n - p)), " SMS"); // Add SMS postfix
}
p = (n + 1);
}
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 4f394aae89..378d20f78e 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -112,7 +112,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet }
res = (char *)mir_alloc(size);
- strcpy(res, httpmethod);
+ mir_strcpy(res, httpmethod);
strcat(res, "&");
strcat(res, urlenc);
mir_free(urlenc);
@@ -195,7 +195,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con ptrA csenc( oauth_uri_escape(consumer_secret));
ptrA tsenc( oauth_uri_escape(token_secret));
ptrA key((char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2));
- strcpy(key, csenc);
+ mir_strcpy(key, csenc);
strcat(key, "&");
strcat(key, tsenc);
@@ -208,7 +208,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con ptrA tsenc( oauth_uri_escape(token_secret));
sign = (char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2);
- strcpy(sign, csenc);
+ mir_strcpy(sign, csenc);
strcat(sign, "&");
strcat(sign, tsenc);
}
@@ -227,7 +227,7 @@ char *oauth_generate_nonce() int strSizeB = int(mir_strlen(timestamp) + sizeof(randnum));
ptrA str((char *)mir_calloc(strSizeB + 1));
- strcpy(str, timestamp);
+ mir_strcpy(str, timestamp);
strncat(str, randnum, sizeof(randnum));
BYTE digest[16];
@@ -273,7 +273,7 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD }
res = (char *)mir_alloc(size);
- strcpy(res, "OAuth ");
+ mir_strcpy(res, "OAuth ");
for (i = 0; i < oauth_parameters.getCount(); i++) {
OAUTHPARAMETER *p = oauth_parameters[i];
@@ -299,7 +299,7 @@ int GGPROTO::oauth_receivetoken() // 1. Obtaining an Unauthorized Request Token
debugLogA("oauth_receivetoken(): Obtaining an Unauthorized Request Token...");
- strcpy(szUrl, "http://api.gadu-gadu.pl/request_token");
+ mir_strcpy(szUrl, "http://api.gadu-gadu.pl/request_token");
str = oauth_auth_header("POST", szUrl, HMACSHA1, uin, password, NULL, NULL);
NETLIBHTTPHEADER httpHeaders[3];
@@ -356,7 +356,7 @@ int GGPROTO::oauth_receivetoken() req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
req.headersCount = 3;
req.headers = httpHeaders;
- strcpy(szUrl, "https://login.gadu-gadu.pl/authorize");
+ mir_strcpy(szUrl, "https://login.gadu-gadu.pl/authorize");
httpHeaders[1].szName = "Content-Type";
httpHeaders[1].szValue = "application/x-www-form-urlencoded";
req.pData = str;
@@ -368,7 +368,7 @@ int GGPROTO::oauth_receivetoken() // 3. Obtaining an Access Token
debugLogA("oauth_receivetoken(): Obtaining an Access Token...");
- strcpy(szUrl, "http://api.gadu-gadu.pl/access_token");
+ mir_strcpy(szUrl, "http://api.gadu-gadu.pl/access_token");
mir_free(str);
str = oauth_auth_header("POST", szUrl, HMACSHA1, uin, password, token, token_secret);
mir_free(token);
diff --git a/protocols/Gadu-Gadu/src/token.cpp b/protocols/Gadu-Gadu/src/token.cpp index e208becaf5..2fcf36d31d 100644 --- a/protocols/Gadu-Gadu/src/token.cpp +++ b/protocols/Gadu-Gadu/src/token.cpp @@ -112,8 +112,8 @@ int GGPROTO::gettoken(GGTOKEN *token) GGTOKENDLGDATA dat = {0};
// Zero tokens
- strcpy(token->id, "");
- strcpy(token->val, "");
+ mir_strcpy(token->id, "");
+ mir_strcpy(token->val, "");
if (!(h = gg_token(0)) || gg_token_watch_fd(h) || h->state == GG_STATE_ERROR || h->state != GG_STATE_DONE) {
TCHAR error[128];
|