summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/stdpackets.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-14 19:04:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-14 19:04:55 +0000
commitb67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 (patch)
treefa22404f4a40f81b86447c5bd7def26fd6815722 /protocols/IcqOscarJ/src/stdpackets.cpp
parentc95efb840d744ec332edfe311b69f1c7ac56560a (diff)
mir_*printf patch for protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@5690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/stdpackets.cpp')
-rw-r--r--protocols/IcqOscarJ/src/stdpackets.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp
index 69d9fd2ac1..35bae4ca14 100644
--- a/protocols/IcqOscarJ/src/stdpackets.cpp
+++ b/protocols/IcqOscarJ/src/stdpackets.cpp
@@ -1510,7 +1510,7 @@ DWORD CIcqProto::icq_sendSMSServ(const char *szPhoneNumber, const char *szMsg)
if (szBuffer = (char *)_alloca(nBufferSize))
{
- wBufferLen = null_snprintf(szBuffer, nBufferSize,
+ wBufferLen = mir_snprintf(szBuffer, nBufferSize,
"<icq_sms_message>"
"<destination>"
"%s" /* phone number */
@@ -1874,8 +1874,9 @@ void CIcqProto::oft_sendFileRequest(DWORD dwUin, char *szUid, oscar_filetransfer
{
icq_packet packet;
- char *szCoolStr = (char*)_alloca(strlennull(ft->szDescription)+strlennull(pszFiles) + 160);
- sprintf(szCoolStr, "<ICQ_COOL_FT><FS>%s</FS><S>%I64u</S><SID>1</SID><DESC>%s</DESC></ICQ_COOL_FT>", pszFiles, ft->qwTotalSize, ft->szDescription);
+ size_t size = strlennull(ft->szDescription)+strlennull(pszFiles) + 160;
+ char *szCoolStr = (char *)_alloca(size);
+ mir_snprintf(szCoolStr, size, "<ICQ_COOL_FT><FS>%s</FS><S>%I64u</S><SID>1</SID><DESC>%s</DESC></ICQ_COOL_FT>", pszFiles, ft->qwTotalSize, ft->szDescription);
szCoolStr = MangleXml(szCoolStr, strlennull(szCoolStr));
WORD wDataLen = 93 + strlennull(szCoolStr) + strlennull(pszFiles);