diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-17 12:47:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-17 12:47:25 +0300 |
commit | 1d36871179fb325cd8a7363fa71fe187d0ddfc14 (patch) | |
tree | f3f47be628e4d1a699b237336f41d46125b91930 /protocols | |
parent | 88cb4210be8c51a6fb567216bb87d2d6cf7826f8 (diff) |
fix for buffer overrun
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber_omemo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index 232f1ea78c..ce5c2c1208 100755 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -614,7 +614,7 @@ void CJabberProto::OmemoAnnounceDevice() // construct node
wchar_t szBareJid[JABBER_MAX_JID_LEN];
XmlNodeIq iq(L"set", SerialNext());
- iq << XATTR(L"from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, sizeof(szBareJid))); //_countof is not portable
+ iq << XATTR(L"from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, _countof(szBareJid)));
HXML publish_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"publish") << XATTR(L"node", JABBER_FEAT_OMEMO L":devicelist");
//pubsub_createnode(JABBER_FEAT_OMEMO L":devicelist", L"TODO_pubsub_address", this); //TODO: get pubsub address somehow
//TODO: handle reply of createnode
@@ -642,7 +642,7 @@ void CJabberProto::OmemoSendBundle() // construct bundle node
wchar_t szBareJid[JABBER_MAX_JID_LEN];
XmlNodeIq iq(L"set", SerialNext());
- iq << XATTR(L"from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, sizeof(szBareJid))); //_countof is not portable
+ iq << XATTR(L"from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, _countof(szBareJid)));
HXML publish_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"publish");
{
|