summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-27 13:23:02 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-27 13:23:17 (GMT)
commit9bb7982a15e51b0336e58d4cafc20529ec50550d (patch)
tree5cc5b6744ac6f8da254487002a5a9a7cd832ba80 /Source/CPack
parentede11598ba16841c7652160ba8dd755c259bc122 (diff)
parentb7e9cd05cd07605d01a50522f65347aa23d2647e (diff)
downloadCMake-9bb7982a15e51b0336e58d4cafc20529ec50550d.zip
CMake-9bb7982a15e51b0336e58d4cafc20529ec50550d.tar.gz
CMake-9bb7982a15e51b0336e58d4cafc20529ec50550d.tar.bz2
Merge topic 'purge-sprintf'
b7e9cd05cd Replace the only non-standard _snprintf with snprintf 5ba6e8ac59 Source: Replace most calls to sprintf with snprintf Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6649
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 1340fb5..6ad3755 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -107,7 +107,7 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Number of lines: " << counter << std::endl);
char buffer[1024];
- sprintf(buffer, "%d", counter);
+ snprintf(buffer, sizeof(buffer), "%d", counter);
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
// Write in file