diff options
author | Brad King <brad.king@kitware.com> | 2021-10-27 13:23:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-10-27 13:23:17 (GMT) |
commit | 9bb7982a15e51b0336e58d4cafc20529ec50550d (patch) | |
tree | 5cc5b6744ac6f8da254487002a5a9a7cd832ba80 /Source/CPack | |
parent | ede11598ba16841c7652160ba8dd755c259bc122 (diff) | |
parent | b7e9cd05cd07605d01a50522f65347aa23d2647e (diff) | |
download | CMake-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.cxx | 2 |
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 |