summaryrefslogtreecommitdiffstats
path: root/Source/cmMathCommand.cxx
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-10-21 16:35:57 (GMT)
committerSean McBride <sean@rogue-research.com>2021-10-25 22:23:13 (GMT)
commit5ba6e8ac59333aa574d5963332e3ef0f4c4d3514 (patch)
treed796f695e10d5ec20508cb04f4c8b3c2a6c0d742 /Source/cmMathCommand.cxx
parent0ce50dd78f68b697e1ab29d52d733b87c5bfb67d (diff)
downloadCMake-5ba6e8ac59333aa574d5963332e3ef0f4c4d3514.zip
CMake-5ba6e8ac59333aa574d5963332e3ef0f4c4d3514.tar.gz
CMake-5ba6e8ac59333aa574d5963332e3ef0f4c4d3514.tar.bz2
Source: Replace most calls to sprintf with snprintf
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 56221bf..df9ebcf 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()) {