summaryrefslogtreecommitdiff
path: root/Source/cmMathCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMathCommand.cxx')
-rw-r--r--Source/cmMathCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx
index 56221bf5b..df9ebcf97 100644
--- a/Source/cmMathCommand.cxx
+++ b/Source/cmMathCommand.cxx
@@ -107,7 +107,7 @@ bool HandleExprCommand(std::vector<std::string> const& args,
fmt = "%" KWIML_INT_PRId64;
break;
}
- sprintf(buffer, fmt, helper.GetResult());
+ snprintf(buffer, sizeof(buffer), fmt, helper.GetResult());
std::string const& w = helper.GetWarning();
if (!w.empty()) {