summaryrefslogtreecommitdiff
path: root/secblock.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-12-24 15:32:20 -0500
committerJeffrey Walton <noloader@gmail.com>2020-12-24 15:32:20 -0500
commitec3733c378a9515e4bfd0254c28238dadc020375 (patch)
tree449f6b2a7cb6ce45a29f82faa91330023d59a13e /secblock.h
parenta779191c45f860f20b8a628b713f61130c4487cd (diff)
downloadcryptopp-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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/secblock.h b/secblock.h
index 0670c6ed..721715b7 100644
--- a/secblock.h
+++ b/secblock.h
@@ -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