diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-29 21:34:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-29 21:34:40 +0000 |
commit | 33d765917eabeb4b664c1b0681d52185920def72 (patch) | |
tree | 2c9e2a65aca18a034daada72599fc6531adae7e1 /protocols/Gadu-Gadu/src/filetransfer.cpp | |
parent | a66281d8453edde56145e032e8d38db91580ba08 (diff) |
no more mir_strncat in GG
git-svn-id: http://svn.miranda-ng.org/main/trunk@13901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/filetransfer.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/filetransfer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp index f0330f7f66..53e3668e3c 100644 --- a/protocols/Gadu-Gadu/src/filetransfer.cpp +++ b/protocols/Gadu-Gadu/src/filetransfer.cpp @@ -662,9 +662,8 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath) {
struct gg_dcc *dcc = (struct gg_dcc *) hTransfer;
char fileName[MAX_PATH], *path = mir_t2a(szPath);
- strncpy(fileName, path, sizeof(fileName));
- mir_strncat(fileName, (char*)dcc->file_info.filename, sizeof(fileName) - mir_strlen(fileName));
- dcc->folder = _strdup((char *) path);
+ mir_snprintf(fileName, _countof(fileName), "%s%s", path, dcc->file_info.filename);
+ dcc->folder = _strdup((char*)path);
dcc->tick = 0;
mir_free(path);
|