diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 05:19:23 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 05:19:23 +0000 |
commit | 114f83d5d8a73b3f1435e09b1d91aff843e4ce15 (patch) | |
tree | 0805188bf6bcf5749d1e76d5d1e73ccb6cf41cc4 /protocols/MSN | |
parent | 6e2b6b31bae6d69bff5271451e73eb08637b8118 (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/MSN')
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapstore.cpp | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 74458df7bd..b04aad206f 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -663,7 +663,7 @@ int ThreadData::sendPacket(const char* cmd, const char* fmt, ...) int thisTrid = 0;
if (fmt == NULL)
- mir_snprintf(str, strsize, "%s", cmd);
+ strncpy_s(str, strsize, cmd, _TRUNCATE);
else {
thisTrid = InterlockedIncrement(&mTrid);
if (fmt[0] == '\0')
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index f0653b83b0..9026ff912e 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -329,7 +329,7 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam gethst = 0;
if (gethst == 0)
- mir_snprintf(ipaddr, SIZEOF(ipaddr), "%s", proto->msnLoggedIn ? proto->MyConnection.GetMyExtIPStr() : "");
+ strncpy_s(ipaddr, (proto->msnLoggedIn ? proto->MyConnection.GetMyExtIPStr() : ""), _TRUNCATE);
SendDlgItemMessage(hwndDlg, IDC_HOSTOPT, CB_SETCURSEL, gethst, 0);
if (ipaddr[0])
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index a6cb19e8e0..345a081f35 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -1398,7 +1398,7 @@ void CMsnProto::p2p_startConnect(const char* wlid, const char* szCallID, const c newThread->mType = SERVER_P2P_DIRECT;
newThread->mInitialContactWLID = mir_strdup(wlid);
- mir_snprintf(newThread->mCookie, SIZEOF(newThread->mCookie), "%s", szCallID);
+ strncpy_s(newThread->mCookie, szCallID, _TRUNCATE);
mir_snprintf(newThread->mServer, SIZEOF(newThread->mServer),
ipv6 ? "[%s]:%s" : "%s:%s", pAddrTokBeg, pPortTokBeg);
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 22b92fe25b..88acf26373 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -637,8 +637,8 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
ezxml_t abinf = ezxml_child(ab, "abInfo");
- mir_snprintf(mycid, SIZEOF(mycid), "%s", ezxml_txt(ezxml_child(abinf, "OwnerCID")));
- mir_snprintf(mypuid, SIZEOF(mypuid), "%s", ezxml_txt(ezxml_child(abinf, "ownerPuid")));
+ strncpy_s(mycid, ezxml_txt(ezxml_child(abinf, "OwnerCID")), _TRUNCATE);
+ strncpy_s(mypuid, ezxml_txt(ezxml_child(abinf, "ownerPuid")), _TRUNCATE);
if (MyOptions.ManageServer) {
ezxml_t grp = ezxml_get(body, szGroups, 0, "Group", -1);
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index 1028e403cc..ccec429d07 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -257,7 +257,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) UpdateStoreHost("GetProfile", body ? storeUrl : NULL);
- mir_snprintf(proresid, SIZEOF(proresid), "%s", ezxml_txt(ezxml_child(body, "ResourceID")));
+ strncpy_s(proresid, ezxml_txt(ezxml_child(body, "ResourceID")), _TRUNCATE);
ezxml_t expr = ezxml_child(body, "ExpressionProfile");
if (expr == NULL) {
@@ -272,10 +272,10 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) const char* szStatus = ezxml_txt(ezxml_child(expr, "PersonalStatus"));
replaceStr(msnLastStatusMsg, szStatus);
- mir_snprintf(expresid, SIZEOF(expresid), "%s", ezxml_txt(ezxml_child(expr, "ResourceID")));
+ strncpy_s(expresid, ezxml_txt(ezxml_child(expr, "ResourceID")), _TRUNCATE);
ezxml_t photo = ezxml_child(expr, "Photo");
- mir_snprintf(photoid, SIZEOF(photoid), "%s", ezxml_txt(ezxml_child(photo, "ResourceID")));
+ strncpy_s(photoid, ezxml_txt(ezxml_child(photo, "ResourceID")), _TRUNCATE);
ezxml_t docstr = ezxml_get(photo, "DocumentStreams", 0, "DocumentStream", -1);
while (docstr) {
@@ -565,7 +565,7 @@ bool CMsnProto::MSN_StoreCreateDocument(const TCHAR *sztName, const char *szMime if (status == 200) {
ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
ezxml_t bdy = getSoapResponse(xmlm, "CreateDocument");
- mir_snprintf(photoid, SIZEOF(photoid), "%s", ezxml_txt(bdy));
+ strncpy_s(photoid, ezxml_txt(bdy), _TRUNCATE);
ezxml_free(xmlm);
}
else if (status == 500) {
|