summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2022-06-17 23:57:11 (GMT)
committerBrad King <brad.king@kitware.com>2022-06-22 12:59:40 (GMT)
commitd5694e46233aa7173134fc3952b5f25a7e0b0f58 (patch)
tree4345562d4404fc697170e23485d6d650f6798699 /Source/cmSystemTools.cxx
parenteccd0b92b6463f86ca010b6a256a4448bb378549 (diff)
downloadCMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.zip
CMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.tar.gz
CMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.tar.bz2
Source: Replace uses of sprintf with safer snprintf
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 351386a..55b0df8 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1218,7 +1218,7 @@ std::string cmSystemTools::ComputeCertificateThumbprint(
certContext, CERT_HASH_PROP_ID, hashData, &hashLength)) {
for (DWORD i = 0; i < hashLength; i++) {
// Convert each byte to hexadecimal
- sprintf(pHashPrint, "%02X", hashData[i]);
+ snprintf(pHashPrint, 3, "%02X", hashData[i]);
pHashPrint += 2;
}
*pHashPrint = '\0';