diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-02-06 12:54:46 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-02-06 13:38:33 +0100 |
commit | 59b2fd40eb3b248f88f972a6403d3f77bf4b5c0e (patch) | |
tree | fe9e0048e2392030f5b55fabe016b2e881684bb7 /vdagent | |
parent | 95d04aa1134b3bcbf79d2c8aa4102ec486c59b80 (diff) |
Use new vdagent_{strncpy,strcat}_s helpers
Diffstat (limited to 'vdagent')
-rw-r--r-- | vdagent/file_xfer.cpp | 4 | ||||
-rw-r--r-- | vdagent/file_xfer.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp index 8d7c86c..9e0bcda 100644 --- a/vdagent/file_xfer.cpp +++ b/vdagent/file_xfer.cpp @@ -87,8 +87,8 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage* start, return; } - strcat(file_path, "\\"); - strcat(file_path, file_name); + vdagent_strcat_s(file_path, sizeof(file_path), "\\"); + vdagent_strcat_s(file_path, sizeof(file_path), file_name); if((wlen = MultiByteToWideChar(CP_UTF8, 0, file_path, -1, NULL, 0)) == 0){ vd_printf("failed getting WideChar length of %s", file_path); return; diff --git a/vdagent/file_xfer.h b/vdagent/file_xfer.h index 07a6808..7f756e3 100644 --- a/vdagent/file_xfer.h +++ b/vdagent/file_xfer.h @@ -27,7 +27,7 @@ typedef struct ALIGN_VC FileXferTask { // FIXME: should raise an error if name is too long.. // currently the only user is FileXfer::handle_start // which verifies that strlen(_name) < MAX_PATH - strncpy(name, _name, sizeof(name) - 1); + vdagent_strncpy_s(name, sizeof(name), _name); } HANDLE handle; uint64_t size; |