diff options
author | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-06-29 12:30:50 +0000 |
---|---|---|
committer | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-06-29 12:30:50 +0000 |
commit | bbd69fc3e300540308642d205e0e9dd2d3dd431f (patch) | |
tree | f19d8d8efc7b3a4ff6263ce500716c2372602e51 | |
parent | 716a80d6c8ec93cc493c845a98d1212cc2a25f10 (diff) | |
download | cryptopp-bbd69fc3e300540308642d205e0e9dd2d3dd431f.tar.gz |
Static analysis showed the unsigned int y is truncated to an unsigned char via _rotr16. It does not appear to be a problem with the library, but it may be a problem for users. The assert will alert in Debug builds (but not Release builds)
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@557 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r-- | misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -708,6 +708,7 @@ template<> inline word16 rotlFixed<word16>(word16 x, unsigned int y) template<> inline word16 rotrFixed<word16>(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); + assert(y <= 255); return y ? _rotr16(x, y) : x; } |