summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_file.cpp')
-rw-r--r--protocols/JabberG/src/jabber_file.cpp4
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) {