diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:57:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:57:06 +0000 |
commit | 97c3f6fe20b6474159beb924c6707bef481faa14 (patch) | |
tree | 874a46db938a12b54b88e04f6324e6fece8bb3de /protocols/JabberG/src/jabber_thread.cpp | |
parent | fc3a4607ee5cfe9e7cfed8d63e2cb1d549f61d92 (diff) |
correct last _tcsncpy_s parameter's value
git-svn-id: http://svn.miranda-ng.org/main/trunk@10558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 70a61cf5fb..4e5bf1b4f9 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -304,13 +304,13 @@ LBL_FatalError: TCHAR jidStr[512];
mir_sntprintf(jidStr, SIZEOF(jidStr), _T("%s@%S/%s"), info->username, info->server, info->resource);
- _tcsncpy_s(info->fullJID, jidStr, SIZEOF(info->fullJID)-1);
+ _tcsncpy_s(info->fullJID, jidStr, _TRUNCATE);
if (m_options.UseDomainLogin) // in the case of NTLM auth we have no need in password
info->password[0] = 0;
else if (!m_options.SavePassword) { // we have to enter a password manually. have we done it before?
if (m_savedPassword != NULL)
- _tcsncpy_s(info->password, SIZEOF(info->password), m_savedPassword, _TRUNCATE);
+ _tcsncpy_s(info->password, m_savedPassword, _TRUNCATE);
else {
mir_sntprintf(jidStr, SIZEOF(jidStr), _T("%s@%S"), info->username, info->server);
@@ -329,7 +329,7 @@ LBL_FatalError: }
m_savedPassword = (param.saveOnlinePassword) ? mir_tstrdup(param.onlinePassword) : NULL;
- _tcsncpy_s(info->password, SIZEOF(info->password), param.onlinePassword, _TRUNCATE);
+ _tcsncpy_s(info->password, param.onlinePassword, _TRUNCATE);
}
}
else {
@@ -339,10 +339,9 @@ LBL_FatalError: debugLogA("Thread ended, password is not configured");
goto LBL_FatalError;
}
- _tcsncpy_s(info->password, SIZEOF(info->password), tszPassw, _TRUNCATE);
+ _tcsncpy_s(info->password, tszPassw, _TRUNCATE);
}
}
-
else if (info->type == JABBER_SESSION_REGISTER) {
// Register new user connection, all connection parameters are already filled-in.
// Multiple thread allowed, although not possible :)
|