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

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/Generators.tests.cpp
diff options
context:
space:
mode:
authorLeitwolf2026-11-17 18:57:52 +0300
committerGitHub2026-11-17 18:57:52 +0300
commit7ff85d401d6f7f2d37fc0566f346a521a9bb7cee (patch)
tree334a71b7a7d5b209f778cc51696ef307be3c06e2 /tests/SelfTest/UsageTests/Generators.tests.cpp
parenteea3be11a9e1a047442d71626557e57c3061da1a (diff)
parent98aa45f74647ab0e18d0a26615fb848f5f798745 (diff)
downloadcatch3-7ff85d401d6f7f2d37fc0566f346a521a9bb7cee.tar.gz
Merge pull request #47 from Progmasoft/security/bounded-strings
Bound three string and XML reads that analysis flagged
Diffstat (limited to 'tests/SelfTest/UsageTests/Generators.tests.cpp')
-rw-r--r--tests/SelfTest/UsageTests/Generators.tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp
index 655c4608..41138b5a 100644
--- a/tests/SelfTest/UsageTests/Generators.tests.cpp
+++ b/tests/SelfTest/UsageTests/Generators.tests.cpp
@@ -12,7 +12,7 @@
#include <Progmasoft/Catch3/Generators/Random.hpp>
#include <Progmasoft/Catch3/Generators/Range.hpp>
-#include <cstring>
+#include <string>
// Generators and sections can be nested freely
@@ -62,7 +62,7 @@ TEST_CASE("tables", "[generators]") {
tuple_type{"etc...", 6}
}));
- REQUIRE(strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)));
+ REQUIRE(std::string(std::get<0>(data)).size() == static_cast<size_t>(std::get<1>(data)));
}