diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 16:25:49 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 16:25:49 +0000 |
commit | f2de79cb2eb8247548650ee80d75be109ac66ee7 (patch) | |
tree | 5f6ae43436ad92857bc3361556e581dea0a28270 /protocols/Gadu-Gadu/src/oauth.cpp | |
parent | 83810fbdf96dc0a842bf149cfa40749e95b0fe63 (diff) |
replace strcat to mir_strcat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13777 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/oauth.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/oauth.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 378d20f78e..f949bd7479 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -113,18 +113,18 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet res = (char *)mir_alloc(size);
mir_strcpy(res, httpmethod);
- strcat(res, "&");
- strcat(res, urlenc);
+ mir_strcat(res, "&");
+ mir_strcat(res, urlenc);
mir_free(urlenc);
- strcat(res, "&");
+ mir_strcat(res, "&");
for (i = 0; i < params.getCount(); i++) {
p = params[i];
if (!mir_strcmp(p->name, "oauth_signature")) continue;
- if (i > 0) strcat(res, "%26");
- strcat(res, p->name);
- strcat(res, "%3D");
- strcat(res, p->value);
+ if (i > 0) mir_strcat(res, "%26");
+ mir_strcat(res, p->name);
+ mir_strcat(res, "%3D");
+ mir_strcat(res, p->value);
}
return res;
@@ -196,8 +196,8 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con ptrA tsenc( oauth_uri_escape(token_secret));
ptrA key((char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2));
mir_strcpy(key, csenc);
- strcat(key, "&");
- strcat(key, tsenc);
+ mir_strcat(key, "&");
+ mir_strcat(key, tsenc);
BYTE digest[MIR_SHA1_HASH_SIZE];
mir_hmac_sha1(digest, (BYTE*)(char*)key, mir_strlen(key), (BYTE*)(char*)text, mir_strlen(text));
@@ -209,8 +209,8 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con sign = (char *)mir_alloc(mir_strlen(csenc) + mir_strlen(tsenc) + 2);
mir_strcpy(sign, csenc);
- strcat(sign, "&");
- strcat(sign, tsenc);
+ mir_strcat(sign, "&");
+ mir_strcat(sign, tsenc);
}
oauth_setparam(params, "oauth_signature", sign);
@@ -277,11 +277,11 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD for (i = 0; i < oauth_parameters.getCount(); i++) {
OAUTHPARAMETER *p = oauth_parameters[i];
- if (i > 0) strcat(res, ",");
- strcat(res, p->name);
- strcat(res, "=\"");
- strcat(res, p->value);
- strcat(res, "\"");
+ if (i > 0) mir_strcat(res, ",");
+ mir_strcat(res, p->name);
+ mir_strcat(res, "=\"");
+ mir_strcat(res, p->value);
+ mir_strcat(res, "\"");
}
oauth_freeparams(oauth_parameters);
|