diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
commit | b67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 (patch) | |
tree | fa22404f4a40f81b86447c5bd7def26fd6815722 /protocols/JabberG/src/jabber_file.cpp | |
parent | c95efb840d744ec332edfe311b69f1c7ac56560a (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/JabberG/src/jabber_file.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 7b8282754c..aed856545a 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -297,8 +297,9 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) if (pFileName != NULL) {
int id = SerialNext();
if (ft->iqId) mir_free(ft->iqId);
- ft->iqId = (TCHAR*)mir_alloc(sizeof(TCHAR)*(strlen(JABBER_IQID)+20));
- wsprintf(ft->iqId, _T(JABBER_IQID)_T("%d"), id);
+ size_t size = strlen(JABBER_IQID) + 20;
+ ft->iqId = (TCHAR *)mir_alloc(sizeof(TCHAR) * size);
+ mir_sntprintf(ft->iqId, size, _T(JABBER_IQID)_T("%d"), id);
char *myAddr = NULL;
DBVARIANT dbv;
@@ -317,8 +318,8 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) mir_free(myAddr);
int len = lstrlen(ptszResource) + lstrlen(ft->jid) + 2;
- TCHAR *fulljid = (TCHAR*)alloca(sizeof(TCHAR)*len);
- wsprintf(fulljid, _T("%s/%s"), ft->jid, ptszResource);
+ TCHAR *fulljid = (TCHAR *)alloca(sizeof(TCHAR) * len);
+ mir_sntprintf(fulljid, len, _T("%s/%s"), ft->jid, ptszResource);
XmlNodeIq iq(_T("set"), id, fulljid);
HXML query = iq << XQUERY(JABBER_FEAT_OOB);
|