diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:06:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:06:14 +0000 |
commit | fc3a4607ee5cfe9e7cfed8d63e2cb1d549f61d92 (patch) | |
tree | 754549fa0a5a62cbf5fa07b93d74bf4f3ab49061 /protocols/JabberG/src/jabber_proto.cpp | |
parent | 772ba179473fa39074278cad7aae84870c9310b8 (diff) |
_tcsncpy -> _tcsncpy_s; strncpy -> strncpy_s
git-svn-id: http://svn.miranda-ng.org/main/trunk@10557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index e222a40427..86bb347cd4 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -139,8 +139,6 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : m_pepServices.insert(new CPepMood(this));
m_pepServices.insert(new CPepActivity(this));
- *m_savedPassword = 0;
-
db_set_resident(m_szModuleName, "Status");
db_set_resident(m_szModuleName, DBSETTING_DISPLAY_UID);
@@ -722,7 +720,7 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) jsr.hdr.lastName = _T("");
jsr.hdr.id = jsb->jid;
- _tcsncpy(jsr.jid, jsb->jid, SIZEOF(jsr.jid));
+ _tcsncpy_s(jsr.jid, jsb->jid, SIZEOF(jsr.jid));
jsr.jid[SIZEOF(jsr.jid)-1] = '\0';
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)jsb->hSearch, (LPARAM)&jsr);
@@ -756,10 +754,10 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) }
mir_sntprintf(jsb->jid, SIZEOF(jsb->jid), _T("%s@%s"), szJid, szServer);
}
- else _tcsncpy(jsb->jid, szJid, SIZEOF(jsb->jid));
+ else _tcsncpy_s(jsb->jid, szJid, SIZEOF(jsb->jid));
mir_free(szServer);
}
- else _tcsncpy(jsb->jid, szJid, SIZEOF(jsb->jid));
+ else _tcsncpy_s(jsb->jid, szJid, SIZEOF(jsb->jid));
debugLog(_T("Adding '%s' without validation"), jsb->jid);
jsb->hSearch = SerialNext();
@@ -1026,7 +1024,7 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int flags, const char* pszS const char* szEnd = strstr(pszSrc, PGP_EPILOG);
char* tempstring = (char*)alloca(strlen(pszSrc) + 1);
size_t nStrippedLength = strlen(pszSrc) - strlen(PGP_PROLOG) - (szEnd ? strlen(szEnd) : 0);
- strncpy(tempstring, pszSrc + strlen(PGP_PROLOG), nStrippedLength);
+ strncpy_s(tempstring, nStrippedLength, pszSrc + strlen(PGP_PROLOG), _TRUNCATE);
tempstring[nStrippedLength] = 0;
pszSrc = tempstring;
isEncrypted = 1;
|