diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:06:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:06:14 +0000 |
commit | fc3a4607ee5cfe9e7cfed8d63e2cb1d549f61d92 (patch) | |
tree | 754549fa0a5a62cbf5fa07b93d74bf4f3ab49061 /protocols/JabberG/src/jabber_file.cpp | |
parent | 772ba179473fa39074278cad7aae84870c9310b8 (diff) |
_tcsncpy -> _tcsncpy_s; strncpy -> strncpy_s
git-svn-id: http://svn.miranda-ng.org/main/trunk@10557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_file.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 1594f0e574..d9b5fa568b 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -95,7 +95,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) for (q=p; q+1<eob && (*q!='\r' || *(q+1)!='\n'); q++);
if (q+1 < eob) {
if ((str=(char*)mir_alloc(q-p+1)) != NULL) {
- strncpy(str, p, q-p);
+ strncpy_s(str, q - p, p, _TRUNCATE);
str[q-p] = '\0';
debugLogA("FT Got: %s", str);
if (ft->state == FT_CONNECTING) {
@@ -362,7 +362,7 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, ft->state = FT_ERROR;
break;
}
- strncpy(str, p, q-p);
+ strncpy_s(str, q - p, p, _TRUNCATE);
str[q-p] = '\0';
debugLogA("FT Got: %s", str);
if (ft->state == FT_CONNECTING) {
|