summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r--Source/cmListCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 7d42fc8..b358327 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -155,7 +155,7 @@ bool HandleLengthCommand(std::vector<std::string> const& args,
GetList(varArgsExpanded, listName, status.GetMakefile());
size_t length = varArgsExpanded.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;