From d5aff4e4f86ddd8e27db8a6f27670ca3ededc01b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 22 Sep 2016 03:08:28 -0400 Subject: [PATCH] Cleared Coverity finding CID 12086 (Issue 299) --- test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test.cpp b/test.cpp index a7cdfcd5..b8f69343 100644 --- a/test.cpp +++ b/test.cpp @@ -431,6 +431,11 @@ void FIPS140_GenerateRandomFiles() template T StringToValue(const std::string& str) { std::istringstream iss(str); + + // Arbitrary, but we need to clear a Coverity finding TAINTED_SCALAR + if(iss.str().length() > 25) + throw InvalidArgument("cryptest.exe: '" + str +"' is tool ong"); + T value; iss >> std::noskipws >> value;