summaryrefslogtreecommitdiff
path: root/Source/cmCommandArgumentParserHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index ccb4f88b0d..c7210b4df8 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -172,7 +172,7 @@ void cmCommandArgumentParserHelper::AllocateParserType(
return;
}
char* out = new char[len + 1];
- strncpy(out, str, len);
+ memcpy(out, str, len);
out[len] = 0;
pt->str = out;
this->Variables.push_back(out);