From b67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Aug 2013 19:04:55 +0000 Subject: mir_*printf patch for protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@5690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/stdpackets.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/IcqOscarJ/src/stdpackets.cpp') 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, "" "" "%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, "%s%I64u1%s", pszFiles, ft->qwTotalSize, ft->szDescription); + size_t size = strlennull(ft->szDescription)+strlennull(pszFiles) + 160; + char *szCoolStr = (char *)_alloca(size); + mir_snprintf(szCoolStr, size, "%s%I64u1%s", pszFiles, ft->qwTotalSize, ft->szDescription); szCoolStr = MangleXml(szCoolStr, strlennull(szCoolStr)); WORD wDataLen = 93 + strlennull(szCoolStr) + strlennull(pszFiles); -- cgit v1.2.3