FYI... Coverity Scan results for Windows x64.
---------- Forwarded message ----------
From: <[email protected]>
Date: Fri, Mar 17, 2017 at 8:20 PM
Subject: New Defects reported by Coverity Scan for Cryptopp
To: [email protected]
Hi,
Please find the latest report on new defect(s) introduced to Cryptopp
found with Coverity Scan.
14 new defect(s) introduced to Cryptopp found with Coverity Scan.
7 defect(s), reported by Coverity Scan earlier, were marked fixed in
the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 14 of 14 defect(s)
** CID 177742: (UNINIT_CTOR)
/drbg.h: 328 in CryptoPP::HMAC_DRBG<CryptoPP::SHA1, (unsigned int)16,
(unsigned int)55>::HMAC_DRBG(const unsigned char *, unsigned long
long, const unsigned char *, unsigned long long, const unsigned char
*, unsigned long long)()
/drbg.h: 328 in CryptoPP::HMAC_DRBG<CryptoPP::SHA256, (unsigned
int)16, (unsigned int)55>::HMAC_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
________________________________________________________________________________________________________
*** CID 177742: (UNINIT_CTOR)
/drbg.h: 328 in CryptoPP::HMAC_DRBG<CryptoPP::SHA1, (unsigned int)16,
(unsigned int)55>::HMAC_DRBG(const unsigned char *, unsigned long
long, const unsigned char *, unsigned long long, const unsigned char
*, unsigned long long)()
322 HMAC_DRBG(const byte* entropy=NULLPTR, size_t
entropyLength=STRENGTH, const byte* nonce=NULLPTR,
323 size_t nonceLength=0, const byte*
personalization=NULLPTR, size_t personalizationLength=0)
324 : NIST_DRBG(), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE)
325 {
326 if (entropy != NULLPTR && entropyLength != 0)
327 DRBG_Instantiate(entropy, entropyLength, nonce,
nonceLength, personalization, personalizationLength);
>>> CID 177742: (UNINIT_CTOR)
>>> Non-static class member "m_reseed" is not initialized in this
>>> constructor nor in any functions that it calls.
328 }
329
330 unsigned int GetSecurityStrength() const {return SECURITY_STRENGTH;}
331 unsigned int GetSeedLength() const {return SEED_LENGTH;}
332 unsigned int GetMinEntropy() const {return MINIMUM_ENTROPY;}
333 unsigned int GetMaxEntropy() const {return MAXIMUM_ENTROPY;}
/drbg.h: 328 in CryptoPP::HMAC_DRBG<CryptoPP::SHA256, (unsigned
int)16, (unsigned int)55>::HMAC_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
322 HMAC_DRBG(const byte* entropy=NULLPTR, size_t
entropyLength=STRENGTH, const byte* nonce=NULLPTR,
323 size_t nonceLength=0, const byte*
personalization=NULLPTR, size_t personalizationLength=0)
324 : NIST_DRBG(), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE)
325 {
326 if (entropy != NULLPTR && entropyLength != 0)
327 DRBG_Instantiate(entropy, entropyLength, nonce,
nonceLength, personalization, personalizationLength);
>>> CID 177742: (UNINIT_CTOR)
>>> Non-static class member "m_reseed" is not initialized in this
>>> constructor nor in any functions that it calls.
328 }
329
330 unsigned int GetSecurityStrength() const {return SECURITY_STRENGTH;}
331 unsigned int GetSeedLength() const {return SEED_LENGTH;}
332 unsigned int GetMinEntropy() const {return MINIMUM_ENTROPY;}
333 unsigned int GetMaxEntropy() const {return MAXIMUM_ENTROPY;}
** CID 177741: Uninitialized members (UNINIT_CTOR)
/poly1305.h: 71 in
CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Poly1305_Base()()
________________________________________________________________________________________________________
*** CID 177741: Uninitialized members (UNINIT_CTOR)
/poly1305.h: 71 in
CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Poly1305_Base()()
65 public:
66 static std::string StaticAlgorithmName() {return
std::string("Poly1305(") + T::StaticAlgorithmName() + ")";}
67
68 CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE)
69 CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE)
70
>>> CID 177741: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_idx" is not initialized in this constructor
>>> nor in any functions that it calls.
71 Poly1305_Base() : m_used(true) {}
72
73 void Resynchronize (const byte *iv, int ivLength=-1);
74 void GetNextIV (RandomNumberGenerator &rng, byte *iv);
75
76 void UncheckedSetKey(const byte *key, unsigned int length,
const NameValuePairs ¶ms);
** CID 177740: (UNINIT_CTOR)
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA512, (unsigned
int)32, (unsigned int)111>::Hash_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA256, (unsigned
int)16, (unsigned int)55>::Hash_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA1, (unsigned int)16,
(unsigned int)55>::Hash_DRBG(const unsigned char *, unsigned long
long, const unsigned char *, unsigned long long, const unsigned char
*, unsigned long long)()
________________________________________________________________________________________________________
*** CID 177740: (UNINIT_CTOR)
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA512, (unsigned
int)32, (unsigned int)111>::Hash_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
208 Hash_DRBG(const byte* entropy=NULLPTR, size_t
entropyLength=STRENGTH, const byte* nonce=NULLPTR,
209 size_t nonceLength=0, const byte*
personalization=NULLPTR, size_t personalizationLength=0)
210 : NIST_DRBG(), m_c(SEEDLENGTH), m_v(SEEDLENGTH)
211 {
212 if (entropy != NULLPTR && entropyLength != 0)
213 DRBG_Instantiate(entropy, entropyLength, nonce,
nonceLength, personalization, personalizationLength);
>>> CID 177740: (UNINIT_CTOR)
>>> Non-static class member "m_reseed" is not initialized in this
>>> constructor nor in any functions that it calls.
214 }
215
216 unsigned int GetSecurityStrength() const {return SECURITY_STRENGTH;}
217 unsigned int GetSeedLength() const {return SEED_LENGTH;}
218 unsigned int GetMinEntropy() const {return MINIMUM_ENTROPY;}
219 unsigned int GetMaxEntropy() const {return MAXIMUM_ENTROPY;}
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA256, (unsigned
int)16, (unsigned int)55>::Hash_DRBG(const unsigned char *, unsigned
long long, const unsigned char *, unsigned long long, const unsigned
char *, unsigned long long)()
208 Hash_DRBG(const byte* entropy=NULLPTR, size_t
entropyLength=STRENGTH, const byte* nonce=NULLPTR,
209 size_t nonceLength=0, const byte*
personalization=NULLPTR, size_t personalizationLength=0)
210 : NIST_DRBG(), m_c(SEEDLENGTH), m_v(SEEDLENGTH)
211 {
212 if (entropy != NULLPTR && entropyLength != 0)
213 DRBG_Instantiate(entropy, entropyLength, nonce,
nonceLength, personalization, personalizationLength);
>>> CID 177740: (UNINIT_CTOR)
>>> Non-static class member "m_reseed" is not initialized in this
>>> constructor nor in any functions that it calls.
214 }
215
216 unsigned int GetSecurityStrength() const {return SECURITY_STRENGTH;}
217 unsigned int GetSeedLength() const {return SEED_LENGTH;}
218 unsigned int GetMinEntropy() const {return MINIMUM_ENTROPY;}
219 unsigned int GetMaxEntropy() const {return MAXIMUM_ENTROPY;}
/drbg.h: 214 in CryptoPP::Hash_DRBG<CryptoPP::SHA1, (unsigned int)16,
(unsigned int)55>::Hash_DRBG(const unsigned char *, unsigned long
long, const unsigned char *, unsigned long long, const unsigned char
*, unsigned long long)()
208 Hash_DRBG(const byte* entropy=NULLPTR, size_t
entropyLength=STRENGTH, const byte* nonce=NULLPTR,
209 size_t nonceLength=0, const byte*
personalization=NULLPTR, size_t personalizationLength=0)
210 : NIST_DRBG(), m_c(SEEDLENGTH), m_v(SEEDLENGTH)
211 {
212 if (entropy != NULLPTR && entropyLength != 0)
213 DRBG_Instantiate(entropy, entropyLength, nonce,
nonceLength, personalization, personalizationLength);
>>> CID 177740: (UNINIT_CTOR)
>>> Non-static class member "m_reseed" is not initialized in this
>>> constructor nor in any functions that it calls.
214 }
215
216 unsigned int GetSecurityStrength() const {return SECURITY_STRENGTH;}
217 unsigned int GetSeedLength() const {return SEED_LENGTH;}
218 unsigned int GetMinEntropy() const {return MINIMUM_ENTROPY;}
219 unsigned int GetMaxEntropy() const {return MAXIMUM_ENTROPY;}
** CID 177739: (UNINIT_CTOR)
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)4, (unsigned
int)8, (bool)1>::SipHash_Base()()
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)2, (unsigned
int)4, (bool)1>::SipHash_Base()()
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)4, (unsigned
int)8, (bool)0>::SipHash_Base()()
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)2, (unsigned
int)4, (bool)0>::SipHash_Base()()
________________________________________________________________________________________________________
*** CID 177739: (UNINIT_CTOR)
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)4, (unsigned
int)8, (bool)1>::SipHash_Base()()
105 FixedSizeSecBlock<word64, 4> m_v;
106 FixedSizeSecBlock<word64, 2> m_k;
107 FixedSizeSecBlock<word64, 2> m_b;
108
109 // Tail bytes
110 FixedSizeSecBlock<byte, 8> m_acc;
>>> CID 177739: (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize
>>> "m_idx".
111 size_t m_idx;
112 };
113
114 //! \class SipHash
115 //! \brief SipHash message authentication code
116 //! \tparam C the number of compression rounds
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)2, (unsigned
int)4, (bool)1>::SipHash_Base()()
105 FixedSizeSecBlock<word64, 4> m_v;
106 FixedSizeSecBlock<word64, 2> m_k;
107 FixedSizeSecBlock<word64, 2> m_b;
108
109 // Tail bytes
110 FixedSizeSecBlock<byte, 8> m_acc;
>>> CID 177739: (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize
>>> "m_idx".
111 size_t m_idx;
112 };
113
114 //! \class SipHash
115 //! \brief SipHash message authentication code
116 //! \tparam C the number of compression rounds
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)4, (unsigned
int)8, (bool)0>::SipHash_Base()()
105 FixedSizeSecBlock<word64, 4> m_v;
106 FixedSizeSecBlock<word64, 2> m_k;
107 FixedSizeSecBlock<word64, 2> m_b;
108
109 // Tail bytes
110 FixedSizeSecBlock<byte, 8> m_acc;
>>> CID 177739: (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize
>>> "m_idx".
111 size_t m_idx;
112 };
113
114 //! \class SipHash
115 //! \brief SipHash message authentication code
116 //! \tparam C the number of compression rounds
/siphash.h: 111 in CryptoPP::SipHash_Base<(unsigned int)2, (unsigned
int)4, (bool)0>::SipHash_Base()()
105 FixedSizeSecBlock<word64, 4> m_v;
106 FixedSizeSecBlock<word64, 2> m_k;
107 FixedSizeSecBlock<word64, 2> m_b;
108
109 // Tail bytes
110 FixedSizeSecBlock<byte, 8> m_acc;
>>> CID 177739: (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize
>>> "m_idx".
111 size_t m_idx;
112 };
113
114 //! \class SipHash
115 //! \brief SipHash message authentication code
116 //! \tparam C the number of compression rounds
** CID 177738: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 92 in CryptoPP::Test::OutputResultOperations(const char
*, const char *, bool, unsigned long, double)()
________________________________________________________________________________________________________
*** CID 177738: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 92 in CryptoPP::Test::OutputResultOperations(const char
*, const char *, bool, unsigned long, double)()
86 // Coverity finding
87 if (g_hertz > 1.0f)
88 std::cout << "<TD>" << std::setprecision(2) <<
std::setiosflags(std::ios::fixed) << timeTaken * g_hertz / iterations
/ 1000000;
89
90 g_logTotal += std::log(iterations/timeTaken);
91 g_logCount++;
>>> CID 177738: API usage errors (STREAM_FORMAT_STATE)
>>> Changing format state of stream "std::cout" for category precision
>>> without later restoring it.
92 }
93
94 /*
95 void BenchMark(const char *name, BlockTransformation &cipher,
double timeTotal)
96 {
97 const int BUF_SIZE = RoundUpToMultipleOf(2048U,
cipher.OptimalNumberOfParallelBlocks() * cipher.BlockSize());
** CID 177737: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 72 in CryptoPP::Test::OutputResultKeying(double, double)()
________________________________________________________________________________________________________
*** CID 177737: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 72 in CryptoPP::Test::OutputResultKeying(double, double)()
66
67 std::cout << "<TD>" << std::setprecision(3) <<
std::setiosflags(std::ios::fixed) << (1000*1000*timeTaken/iterations);
68
69 // Coverity finding
70 if (g_hertz > 1.0f)
71 std::cout << "<TD>" << std::setprecision(0) <<
std::setiosflags(std::ios::fixed) << timeTaken * g_hertz / iterations;
>>> CID 177737: API usage errors (STREAM_FORMAT_STATE)
>>> Changing format state of stream "std::cout" for category precision
>>> without later restoring it.
72 }
73
74 void OutputResultOperations(const char *name, const char
*operation, bool pc, unsigned long iterations, double timeTaken)
75 {
76 // Coverity finding, also see
https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKcj-2FDofvgnh6Yfgrv8Yf9n0CSwWGyysp7LPySN8lAmmMTA-3D-3D_Q7QzZ7iXo-2FBXM79C9lXioIEFwFf94JwOslZnckW5VaffqbyuFcd6-2Fpkv8iizW5pDEoFGHBQr-2F0enxejxyioX8ajn0BmQSCWNdyG7t7gG99E9xjHCK5URiEhDlr-2Bf3hP-2FqpAeZpZXtyILTIth6vx8v6ocvhgC0Nttq1HhAqJigsWvcE241AxuZXl-2FW2ls0j7Mt56gZSFRnYa-2FW5TN5nghndDDyLP35sCFK4u-2FLl8XdGA-3D
77 StreamState ss(std::cout);
** CID 177736: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 56 in CryptoPP::Test::OutputResultBytes(const char *,
double, double)()
________________________________________________________________________________________________________
*** CID 177736: API usage errors (STREAM_FORMAT_STATE)
/bench1.cpp: 56 in CryptoPP::Test::OutputResultBytes(const char *,
double, double)()
50 std::cout << std::setiosflags(std::ios::fixed);
51 std::cout << "<TD>" << std::setprecision(0) <<
std::setiosflags(std::ios::fixed) << mbs;
52 if (g_hertz > 1.0f)
53 std::cout << "<TD>" << std::setprecision(1) <<
std::setiosflags(std::ios::fixed) << timeTaken * g_hertz / length;
54 g_logTotal += std::log(mbs);
55 g_logCount++;
>>> CID 177736: API usage errors (STREAM_FORMAT_STATE)
>>> Changing format state of stream "std::cout" for category precision
>>> without later restoring it.
56 }
57
58 void OutputResultKeying(double iterations, double timeTaken)
59 {
60 // Coverity finding, also see
https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKcj-2FDofvgnh6Yfgrv8Yf9n0CSwWGyysp7LPySN8lAmmMTA-3D-3D_Q7QzZ7iXo-2FBXM79C9lXioIEFwFf94JwOslZnckW5VaffqbyuFcd6-2Fpkv8iizW5pDYyUU2BQnJIqMCQ9lzo3hCqpgAo3ZpJHm0OqvEHbDxnK08gRDZnuwr4r9Oa4eQ0U-2BdcynHrVY-2F56IgQe7I9gFn32c8I-2Fv0WzjPeExhhPbRNmH9tlOq4zimKNaf2gHCVsUfix9Oqm1u-2FzpYTsj7WKlYr1bgfZTo16q1IFdrhh9ExI-3D
61 StreamState ss(std::cout);
** CID 177735: (STREAM_FORMAT_STATE)
/validat3.cpp: 89 in
CryptoPP::Test::HashModuleTest(CryptoPP::HashTransformation &, const
CryptoPP::Test::HashTestTuple *, unsigned int)()
/validat3.cpp: 89 in
CryptoPP::Test::HashModuleTest(CryptoPP::HashTransformation &, const
CryptoPP::Test::HashTestTuple *, unsigned int)()
________________________________________________________________________________________________________
*** CID 177735: (STREAM_FORMAT_STATE)
/validat3.cpp: 89 in
CryptoPP::Test::HashModuleTest(CryptoPP::HashTransformation &, const
CryptoPP::Test::HashTestTuple *, unsigned int)()
83 std::cout << " \"" << (char *)testSet[i].input << '\"';
84 if (testSet[i].repeatTimes != 1)
85 std::cout << " repeated " << std::dec <<
testSet[i].repeatTimes << " times";
86 std::cout << std::endl;
87 }
88
>>> CID 177735: (STREAM_FORMAT_STATE)
>>> Changing format state of stream "std::cout" for categories basefield,
>>> fill without later restoring it.
89 return pass;
90 }
91
92 bool ValidateCRC32()
93 {
94 HashTestTuple testSet[] =
/validat3.cpp: 89 in
CryptoPP::Test::HashModuleTest(CryptoPP::HashTransformation &, const
CryptoPP::Test::HashTestTuple *, unsigned int)()
83 std::cout << " \"" << (char *)testSet[i].input << '\"';
84 if (testSet[i].repeatTimes != 1)
85 std::cout << " repeated " << std::dec <<
testSet[i].repeatTimes << " times";
86 std::cout << std::endl;
87 }
88
>>> CID 177735: (STREAM_FORMAT_STATE)
>>> Changing format state of stream "std::cout" for category fill without
>>> later restoring it.
89 return pass;
90 }
91
92 bool ValidateCRC32()
93 {
94 HashTestTuple testSet[] =
** CID 177734: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/ecpoint.h: 55 in ()
________________________________________________________________________________________________________
*** CID 177734: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/ecpoint.h: 55 in ()
49
50 CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<ECPPoint>;
51
52 //! \class EC2NPoint
53 //! \brief Elliptical Curve Point over GF(2^n)
54 //! \since Crypto++ 2.0
>>> CID 177734: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "CryptoPP::EC2NPoint" may benefit from adding a move assignment
>>> operator. See other events which show the copy assignment operator being
>>> applied to rvalue(s), where a move assignment may be faster.
55 struct CRYPTOPP_DLL EC2NPoint
56 {
57 virtual ~EC2NPoint() {}
58
59 //! \brief Construct an EC2NPoint
60 //! \details identity is set to <tt>true</tt>
** CID 177733: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/ecpoint.h: 21 in ()
________________________________________________________________________________________________________
*** CID 177733: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/ecpoint.h: 21 in ()
15
16 NAMESPACE_BEGIN(CryptoPP)
17
18 //! \class ECPPoint
19 //! \brief Elliptical Curve Point over GF(p), where p is prime
20 //! \since Crypto++ 2.0
>>> CID 177733: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "CryptoPP::ECPPoint" may benefit from adding a move assignment
>>> operator. See other events which show the copy assignment operator being
>>> applied to rvalue(s), where a move assignment may be faster.
21 struct CRYPTOPP_DLL ECPPoint
22 {
23 virtual ~ECPPoint() {}
24
25 //! \brief Construct an ECPPoint
26 //! \details identity is set to <tt>true</tt>
** CID 177732: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/asn.h: 166 in ()
________________________________________________________________________________________________________
*** CID 177732: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/asn.h: 166 in ()
160 //! \brief BER decode and DER re-encode
161 //! \param bt BufferedTransformation object for writing
162 //! \param dest BufferedTransformation object
163 CRYPTOPP_DLL void CRYPTOPP_API
DERReencode(BufferedTransformation &bt, BufferedTransformation &dest);
164
165 //! \brief Object Identifier
>>> CID 177732: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "CryptoPP::OID" may benefit from adding a move assignment
>>> operator. See other events which show the copy assignment operator being
>>> applied to rvalue(s), where a move assignment may be faster.
166 class CRYPTOPP_DLL OID
167 {
168 public:
169 virtual ~OID() {}
170
171 //! \brief Construct an OID
** CID 177731: Incorrect expression (IDENTICAL_BRANCHES)
/mersenne.h: 33 in CryptoPP::MersenneTwister<(unsigned int)2567483615,
(unsigned int)397, (unsigned int)624, (unsigned int)69069, (unsigned
long)4537>::StaticAlgorithmName()()
________________________________________________________________________________________________________
*** CID 177731: Incorrect expression (IDENTICAL_BRANCHES)
/mersenne.h: 33 in CryptoPP::MersenneTwister<(unsigned int)2567483615,
(unsigned int)397, (unsigned int)624, (unsigned int)69069, (unsigned
long)4537>::StaticAlgorithmName()()
27 //! \sa MT19937, MT19937ar
28 //! \since Crypto++ 5.6.3
29 template <unsigned int K, unsigned int M, unsigned int N,
unsigned int F, unsigned long S>
30 class MersenneTwister : public RandomNumberGenerator
31 {
32 public:
>>> CID 177731: Incorrect expression (IDENTICAL_BRANCHES)
>>> Ternary expression on condition "true" has identical then and else
>>> expressions: ""MT19937"". Should one of the expressions be modified, or the
>>> entire ternary expression replaced?
33 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {
return (S==5489 ? "MT19937ar" : (S==4537 ? "MT19937" : "MT19937")); }
34
35 ~MersenneTwister() {}
36
37 //! \brief Construct a Mersenne Twister
38 //! \param seed 32-bit seed
** CID 177730: (DEADCODE)
/validat3.cpp: 907 in CryptoPP::Test::ValidateSipHash()()
/validat3.cpp: 911 in CryptoPP::Test::ValidateSipHash()()
/validat3.cpp: 919 in CryptoPP::Test::ValidateSipHash()()
/validat3.cpp: 923 in CryptoPP::Test::ValidateSipHash()()
________________________________________________________________________________________________________
*** CID 177730: (DEADCODE)
/validat3.cpp: 907 in CryptoPP::Test::ValidateSipHash()()
901 {
902 fail = (SipHash<2,4>::StaticAlgorithmName() !=
"SipHash-2-4");
903 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-2-4 algorithm name\n";
904 pass = pass && !fail;
905
906 fail = (SipHash<2,4, false>::DIGESTSIZE != 8);
>>> CID 177730: (DEADCODE)
>>> Execution cannot reach the expression ""FAILED "" inside this
>>> statement: "(std::cout << (fail ? "FAIL...".
907 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-2-4 64-bit digest size\n";
908 pass = pass && !fail;
909
910 fail = (SipHash<2,4, true>::DIGESTSIZE != 16);
911 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-2-4 128-bit digest size\n";
912 pass = pass && !fail;
/validat3.cpp: 911 in CryptoPP::Test::ValidateSipHash()()
905
906 fail = (SipHash<2,4, false>::DIGESTSIZE != 8);
907 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-2-4 64-bit digest size\n";
908 pass = pass && !fail;
909
910 fail = (SipHash<2,4, true>::DIGESTSIZE != 16);
>>> CID 177730: (DEADCODE)
>>> Execution cannot reach the expression ""FAILED "" inside this
>>> statement: "(std::cout << (fail ? "FAIL...".
911 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-2-4 128-bit digest size\n";
912 pass = pass && !fail;
913
914 fail = (SipHash<4,8>::StaticAlgorithmName() !=
"SipHash-4-8");
915 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 algorithm name\n";
916 pass = pass && !fail;
/validat3.cpp: 919 in CryptoPP::Test::ValidateSipHash()()
913
914 fail = (SipHash<4,8>::StaticAlgorithmName() !=
"SipHash-4-8");
915 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 algorithm name\n";
916 pass = pass && !fail;
917
918 fail = (SipHash<4,8, false>::DIGESTSIZE != 8);
>>> CID 177730: (DEADCODE)
>>> Execution cannot reach the expression ""FAILED "" inside this
>>> statement: "(std::cout << (fail ? "FAIL...".
919 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 64-bit digest size\n";
920 pass = pass && !fail;
921
922 fail = (SipHash<4,8, true>::DIGESTSIZE != 16);
923 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 128-bit digest size\n";
924 pass = pass && !fail;
/validat3.cpp: 923 in CryptoPP::Test::ValidateSipHash()()
917
918 fail = (SipHash<4,8, false>::DIGESTSIZE != 8);
919 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 64-bit digest size\n";
920 pass = pass && !fail;
921
922 fail = (SipHash<4,8, true>::DIGESTSIZE != 16);
>>> CID 177730: (DEADCODE)
>>> Execution cannot reach the expression ""FAILED "" inside this
>>> statement: "(std::cout << (fail ? "FAIL...".
923 std::cout << (fail ? "FAILED " : "passed
") << "SipHash-4-8 128-bit digest size\n";
924 pass = pass && !fail;
925 }
926
927 // Siphash-2-4, 64-bit MAC
928 {
** CID 177729: Error handling issues (CHECKED_RETURN)
/validat2.cpp: 1019 in CryptoPP::Test::ValidateECDSA()()
________________________________________________________________________________________________________
*** CID 177729: Error handling issues (CHECKED_RETURN)
/validat2.cpp: 1019 in CryptoPP::Test::ValidateECDSA()()
1013 GF2NT gf2n(191, 9, 0);
1014 byte
a[]="\x28\x66\x53\x7B\x67\x67\x52\x63\x6A\x68\xF5\x65\x54\xE1\x26\x40\x27\x6B\x64\x9E\xF7\x52\x62\x67";
1015 byte
b[]="\x2E\x45\xEF\x57\x1F\x00\x78\x6F\x67\xB0\x08\x1B\x94\x95\xA3\xD9\x54\x62\xF5\xDE\x0A\xA1\x85\xEC";
1016 EC2N ec(gf2n, PolynomialMod2(a,24), PolynomialMod2(b,24));
1017
1018 EC2N::Point P;
>>> CID 177729: Error handling issues (CHECKED_RETURN)
>>> Calling "DecodePoint" without checking return value (as is done
>>> elsewhere 4 out of 5 times).
1019 ec.DecodePoint(P, (byte
*)"\x04\x36\xB3\xDA\xF8\xA2\x32\x06\xF9\xC4\xF2\x99\xD7\xB2\x1A\x9C\x36\x91\x37\xF2\xC8\x4A\xE1\xAA\x0D"
1020
"\x76\x5B\xE7\x34\x33\xB3\xF9\x5E\x33\x29\x32\xE7\x0E\xA2\x45\xCA\x24\x18\xEA\x0E\xF9\x80\x18\xFB",
ec.EncodedPointSize());
1021 Integer n("40000000000000000000000004a20e90c39067c893bbb9a5H");
1022 Integer d("340562e1dda332f9d2aec168249b5696ee39d0ed4d03760fH");
1023 EC2N::Point Q(ec.Multiply(d, P));
1024 ECDSA<EC2N, SHA>::Signer priv(ec, P, n, d);
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.