Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcat_mint2020-12-01 09:59:27 -0800
committerGitHub2020-12-01 18:59:27 +0100
commit21c97f2fad9ab9c979b7d1065253bbb4b172b6dc (patch)
tree54701ea475a0071f110d21e2498a08a21d980cc7
parent5b1a6ae00ad66f9c99573cde9e38a4560d89e416 (diff)
downloadcatch3-21c97f2fad9ab9c979b7d1065253bbb4b172b6dc.tar.gz
Use snprintf instead of sprintf (#2111)
-rw-r--r--src/catch2/reporters/catch_reporter_combined_tu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/reporters/catch_reporter_combined_tu.cpp b/src/catch2/reporters/catch_reporter_combined_tu.cpp
index d6adc60e..d9e94aa9 100644
--- a/src/catch2/reporters/catch_reporter_combined_tu.cpp
+++ b/src/catch2/reporters/catch_reporter_combined_tu.cpp
@@ -44,7 +44,7 @@ namespace Catch {
#ifdef _MSC_VER
sprintf_s( buffer, "%.3f", duration );
#else
- std::sprintf( buffer, "%.3f", duration );
+ std::snprintf( buffer, maxDoubleSize, "%.3f", duration );
#endif
return std::string( buffer );
}