Skip to content

Commit

Permalink
use strcpy_s and strcat_s instead
Browse files Browse the repository at this point in the history
  • Loading branch information
si458 committed Feb 7, 2024
1 parent 25050d4 commit 86d04cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meshcore/agentcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -4132,8 +4132,8 @@ void MeshServer_ConnectEx(MeshAgentHostContainer *agent)
// Set User-Agent for proxies to identify agents and versions
const char* FieldData = "MeshAgent ";
char combined[40];
strcpy(combined, FieldData);
strcat(combined, SOURCE_COMMIT_DATE);
strcpy_s(combined, 40, FieldData);
strcat_s(combined, (int)strnlen_s(SOURCE_COMMIT_DATE, 40), SOURCE_COMMIT_DATE);
ILibAddHeaderLine(req, "User-Agent", 10, combined, (int)strnlen_s(combined, 50));

free(path);
Expand Down

0 comments on commit 86d04cc

Please sign in to comment.