You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crypto++ Users
There's a bug in secblock.h in the handling of an aligned buffer. The
buffer is able to be aligned anywhere in 16 bytes, but the array has
only 8 extra allocated. This bug is only tripped when the memory falls
such that more than 8 bytes of realignment are required. It trips the
assert at line 197 of secblock.h as m_allocated gets overwritten.
line 221:
CRYPTOPP_ALIGN_DATA(8) T m_array[(CRYPTOPP_BOOL_ALIGN16_ENABLED &&
T_Align16) ? S+8/sizeof(T) : S];
Fix: change line 221 to:
CRYPTOPP_ALIGN_DATA(8) T m_array[(CRYPTOPP_BOOL_ALIGN16_ENABLED &&
T_Align16) ? S+16/sizeof(T) : S];
Wei Dai
unread,
Mar 4, 2012, 2:41:49 PM3/4/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crypto++ Users
The CRYPTOPP_ALIGN_DATA(8) is supposed to ensure that the allocated
buffer is already aligned on a 8-byte boundary, so that at most 8
bytes of adjustment is needed. Apparently it's not working. What OS/
compiler are you using?