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/Tlen/src | |
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/Tlen/src')
-rw-r--r-- | protocols/Tlen/src/tlen.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_file.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_iqid.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 38249081ca..81ef9b9d2e 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -239,11 +239,11 @@ int TlenProtocol::OnModulesLoaded(WPARAM wParam, LPARAM lParam) if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE);
- mir_snprintf(str, SIZEOF(str), "%s", LPGEN("Incoming mail"));
+ strncpy_s(str, LPGEN("Incoming mail"), _TRUNCATE);
SkinAddNewSoundEx("TlenMailNotify", m_szModuleName, str);
- mir_snprintf(str, SIZEOF(str), "%s", LPGEN("Alert"));
+ strncpy_s(str, LPGEN("Alert"), _TRUNCATE);
SkinAddNewSoundEx("TlenAlertNotify", m_szModuleName, str);
- mir_snprintf(str, SIZEOF(str), "%s", LPGEN("Voice chat"));
+ strncpy_s(str, LPGEN("Voice chat"), _TRUNCATE);
SkinAddNewSoundEx("TlenVoiceNotify", m_szModuleName, str);
HookProtoEvent(ME_USERINFO_INITIALISE, &TlenProtocol::UserInfoInit);
diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp index b0460c24a6..ef073b9ec2 100644 --- a/protocols/Tlen/src/tlen_file.cpp +++ b/protocols/Tlen/src/tlen_file.cpp @@ -276,7 +276,7 @@ static void TlenFileSendParse(TLEN_FILE_TRANSFER *ft) t++;
else
t = ft->files[i];
- mir_snprintf(filename, (SIZEOF(filename) - 1), "%s", t);
+ strncpy_s(filename, t, _TRUNCATE);
TlenP2PPacketPackBuffer(packet, filename, sizeof(filename));
}
TlenP2PPacketSend(ft->s, packet);
@@ -572,7 +572,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if (strchr(from, '@') == NULL) {
mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, info->server);
} else {
- mir_snprintf(jid, SIZEOF(jid), "%s", from);
+ strncpy_s(jid, from, _TRUNCATE);
}
if ((e=TlenXmlGetAttrValue(node, "e")) != NULL) {
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index f041d712ca..a03d1a7614 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -257,7 +257,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) return;
if (strchr(jid, '@') != NULL) {
- mir_snprintf(text, SIZEOF(text), "%s", jid);
+ strncpy_s(text, jid, _TRUNCATE);
} else {
mir_snprintf(text, SIZEOF(text), "%s@%s", jid, dbv.pszVal); // Add @tlen.pl
}
@@ -419,7 +419,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(itemNode->name, "item")) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (strchr(jid, '@') != NULL) {
- mir_snprintf(jsr.jid, SIZEOF(jsr.jid), "%s", jid);
+ strncpy_s(jsr.jid, jid, _TRUNCATE);
} else {
mir_snprintf(jsr.jid, SIZEOF(jsr.jid), "%s@%s", jid, dbv.pszVal);
}
@@ -467,7 +467,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if (proto->searchJID != NULL) {
if (!found) {
if (strchr(proto->searchJID, '@') != NULL) {
- mir_snprintf(jsr.jid, SIZEOF(jsr.jid), "%s", proto->searchJID);
+ strncpy_s(jsr.jid, proto->searchJID, _TRUNCATE);
} else {
mir_snprintf(jsr.jid, SIZEOF(jsr.jid), "%s@%s", proto->searchJID, dbv.pszVal);
}
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 0f406d9c77..9712af7339 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -154,7 +154,7 @@ static int TlenMUCSendPresence(TlenProtocol *proto, const char *roomID, const ch if (nick != NULL) {
mir_snprintf(str, SIZEOF(str), "%s/%s", roomID, nick);
} else {
- mir_snprintf(str, SIZEOF(str), "%s", roomID);
+ strncpy_s(str, roomID, _TRUNCATE);
}
if ((jid = TlenTextEncode(str)) != NULL) {
switch (desiredStatus) {
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index c243fa11ec..9f714bbdb6 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -1190,7 +1190,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) if (strchr(from, '@') == NULL) {
mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, info->server);
} else {
- mir_snprintf(jid, SIZEOF(jid), "%s", from);
+ strncpy_s(jid, from, _TRUNCATE);
}
if ((e=TlenXmlGetAttrValue(node, "e")) != NULL) {
if (!strcmp(e, "1")) {
|