summaryrefslogtreecommitdiff
path: root/esign.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-18 15:32:28 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-18 15:32:28 -0500
commit6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e (patch)
treef0d873d0b377a91dce5ee384e60426ef57efc92b /esign.h
parentd2fda9bd4231a7dfcb44e59150f11246d992843f (diff)
downloadcryptopp-git-6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e.tar.gz
Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup)
Diffstat (limited to 'esign.h')
-rw-r--r--esign.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/esign.h b/esign.h
index 1e74fce5..e9969d3e 100644
--- a/esign.h
+++ b/esign.h
@@ -45,7 +45,8 @@ public:
void SetPublicExponent(const Integer &e) {m_e = e;}
protected:
- unsigned int GetK() const {return m_n.BitCount()/3-1;}
+ // Covertiy finding on overflow. The library allows small values for research purposes.
+ unsigned int GetK() const {return SaturatingSubtract(m_n.BitCount()/3, 1U);}
Integer m_n, m_e;
};