diff options
-rw-r--r-- | doc/relnotes/1_11_5.rst | 11 | ||||
-rw-r--r-- | src/utils/rotate.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/relnotes/1_11_5.rst b/doc/relnotes/1_11_5.rst new file mode 100644 index 000000000..f554283ca --- /dev/null +++ b/doc/relnotes/1_11_5.rst @@ -0,0 +1,11 @@ +Version 1.11.5, Not Yet Released +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* TLS channels now support sending a ``std::vector`` + +* Add a generic 64-bit multiply instruction for producing a 128 bit result + in mul128.h + +* Avoid potentially undefined operations in the bit rotation operations. Not + known to have caused problems under existing compilers but might break in the + future. Found by Clang sanitizer, reported by Jeffrey Walton. diff --git a/src/utils/rotate.h b/src/utils/rotate.h index 465746e0b..2593010b4 100644 --- a/src/utils/rotate.h +++ b/src/utils/rotate.h @@ -20,6 +20,8 @@ namespace Botan { */ template<typename T> inline T rotate_left(T input, size_t rot) { + if(rot == 0) + return input; return static_cast<T>((input << rot) | (input >> (8*sizeof(T)-rot)));; } @@ -31,6 +33,8 @@ template<typename T> inline T rotate_left(T input, size_t rot) */ template<typename T> inline T rotate_right(T input, size_t rot) { + if(rot == 0) + return input; return static_cast<T>((input >> rot) | (input << (8*sizeof(T)-rot))); } |