diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-12-24 15:32:20 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-12-24 15:32:20 -0500 |
commit | ec3733c378a9515e4bfd0254c28238dadc020375 (patch) | |
tree | 449f6b2a7cb6ce45a29f82faa91330023d59a13e /secblock.h | |
parent | a779191c45f860f20b8a628b713f61130c4487cd (diff) | |
download | cryptopp-git-ec3733c378a9515e4bfd0254c28238dadc020375.tar.gz |
Fix offset calculation in FixedSizeAllocatorWithCleanup when CRYPTOPP_BOOL_ALIGN16==0 (GH #988)
Diffstat (limited to 'secblock.h')
-rw-r--r-- | secblock.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -524,7 +524,7 @@ private: // to be done. if m_array%16 is 8, then the buffer
// is not 16-byte aligned and we need to add 8.
CRYPTOPP_ASSERT(IsAlignedOn(m_array, 8));
- int off = reinterpret_cast<uintptr_t>(m_array) % 8;
+ int off = reinterpret_cast<uintptr_t>(m_array) % 16;
byte* ptr = reinterpret_cast<byte*>(m_array) + off;
// Verify the 16-byte alignment. This is the point
|