diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Steam/src/api | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/api')
-rw-r--r-- | protocols/Steam/src/api/friend_list.h | 18 | ||||
-rw-r--r-- | protocols/Steam/src/api/login.h | 4 | ||||
-rw-r--r-- | protocols/Steam/src/api/pending.h | 18 | ||||
-rw-r--r-- | protocols/Steam/src/api/session.h | 2 |
4 files changed, 21 insertions, 21 deletions
diff --git a/protocols/Steam/src/api/friend_list.h b/protocols/Steam/src/api/friend_list.h index 4c1d6f8ef2..7721f0c921 100644 --- a/protocols/Steam/src/api/friend_list.h +++ b/protocols/Steam/src/api/friend_list.h @@ -20,13 +20,13 @@ public: HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/AddFriendAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
- mir_snprintf(data, SIZEOF(data),
+ mir_snprintf(data, _countof(data),
"sessionID=%s&steamid=%s",
sessionId,
who);
@@ -44,13 +44,13 @@ public: HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/BlockUserAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
- mir_snprintf(data, SIZEOF(data),
+ mir_snprintf(data, _countof(data),
"sessionID=%s&action=ignore&steamid=%s",
sessionId,
who);
@@ -68,13 +68,13 @@ public: HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/RemoveFriendAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
- mir_snprintf(data, SIZEOF(data),
+ mir_snprintf(data, _countof(data),
"sessionID=%s&steamid=%s",
sessionId,
who);
diff --git a/protocols/Steam/src/api/login.h b/protocols/Steam/src/api/login.h index 64b41f07cb..00392dd34d 100644 --- a/protocols/Steam/src/api/login.h +++ b/protocols/Steam/src/api/login.h @@ -8,7 +8,7 @@ public: HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logon/v0001")
{
char data[256];
- mir_snprintf(data, SIZEOF(data), "access_token=%s&ui_mode=web", token);
+ mir_snprintf(data, _countof(data), "access_token=%s&ui_mode=web", token);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded");
@@ -22,7 +22,7 @@ public: HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logoff/v0001")
{
char data[256];
- mir_snprintf(data, SIZEOF(data), "access_token=%s&umqid=%s", token, umqId);
+ mir_snprintf(data, _countof(data), "access_token=%s&umqid=%s", token, umqId);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded");
diff --git a/protocols/Steam/src/api/pending.h b/protocols/Steam/src/api/pending.h index f9965d341f..4e971275b4 100644 --- a/protocols/Steam/src/api/pending.h +++ b/protocols/Steam/src/api/pending.h @@ -8,13 +8,13 @@ public: HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, SIZEOF(data), "sessionID=%s&id=%s&perform=accept&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=accept&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
@@ -29,13 +29,13 @@ public: HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, SIZEOF(data), "sessionID=%s&id=%s&perform=ignore&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=ignore&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
@@ -50,13 +50,13 @@ public: HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, SIZEOF(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, SIZEOF(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, SIZEOF(data), "sessionID=%s&id=%s&perform=block&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=block&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
diff --git a/protocols/Steam/src/api/session.h b/protocols/Steam/src/api/session.h index 3e13a2e418..5499d33c74 100644 --- a/protocols/Steam/src/api/session.h +++ b/protocols/Steam/src/api/session.h @@ -10,7 +10,7 @@ public: flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
char data[512];
- mir_snprintf(data, SIZEOF(data),
+ mir_snprintf(data, _countof(data),
"oauth_token=%s&steamid=%s&webcookie=%s",
token,
steamId,
|