summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r--Source/cmStringCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index f44fcf7..e5935b8 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -526,7 +526,7 @@ bool HandleLengthCommand(std::vector<std::string> const& args,
size_t length = stringValue.size();
char buffer[1024];
- sprintf(buffer, "%d", static_cast<int>(length));
+ snprintf(buffer, sizeof(buffer), "%d", static_cast<int>(length));
status.GetMakefile().AddDefinition(variableName, buffer);
return true;