summaryrefslogtreecommitdiff
path: root/protocols/Yahoo
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-02 05:19:23 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-02 05:19:23 +0000
commit114f83d5d8a73b3f1435e09b1d91aff843e4ce15 (patch)
tree0805188bf6bcf5749d1e76d5d1e73ccb6cf41cc4 /protocols/Yahoo
parent6e2b6b31bae6d69bff5271451e73eb08637b8118 (diff)
mir_snprintf(..., "%s", ...) -> strncpy_s(...)
build fix to prevous commit git-svn-id: http://svn.miranda-ng.org/main/trunk@11212 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r--protocols/Yahoo/src/yahoo.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index 44e313320e..eb920fe9ba 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -794,12 +794,12 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha
if (lname && fname)
mir_snprintf(nick, SIZEOF(nick), "%s %s", fname, lname);
else if (lname)
- mir_snprintf(nick, SIZEOF(nick), "%s", lname);
+ strncpy_s(nick, lname, _TRUNCATE);
else if (fname)
- mir_snprintf(nick, SIZEOF(nick), "%s", fname);
+ strncpy_s(nick, fname, _TRUNCATE);
- if (nick[0] == '\0')
- mir_snprintf(nick, SIZEOF(nick), "%s", who);
+ if (nick[0] == '\0')
+ strncpy_s(nick, who, _TRUNCATE);
if (fname) SetStringUtf(hContact, "FirstName", fname);
if (lname) SetStringUtf(hContact, "LastName", lname);
@@ -1546,14 +1546,10 @@ void CYahooProto::ext_login(enum yahoo_status login_mode)
if (host[0] == '\0') {
if (!getString(YAHOO_LOGINSERVER, &dbv)) {
- mir_snprintf(host, SIZEOF(host), "%s", dbv.pszVal);
+ strncpy_s(host, dbv.pszVal, _TRUNCATE);
db_free(&dbv);
- }
- else {
- mir_snprintf(host, SIZEOF(host), "%s",
- getByte("YahooJapan",0) != 0 ? YAHOO_DEFAULT_JAPAN_LOGIN_SERVER :
- YAHOO_DEFAULT_LOGIN_SERVER
- );
+ } else {
+ strncpy_s(host, (getByte("YahooJapan",0) ? YAHOO_DEFAULT_JAPAN_LOGIN_SERVER : YAHOO_DEFAULT_LOGIN_SERVER), _TRUNCATE);
}
}