diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-10-14 01:00:49 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-10-14 01:00:49 -0400 |
commit | 0c27093ab681236f423cf268bfefe38a5d690130 (patch) | |
tree | 0e65fbeb4ccd3eecd433e5655ed416860f5c7f84 /allocate.cpp | |
parent | 55b5464e50602ff4958eb27ec58e79263da4283b (diff) | |
download | cryptopp-git-0c27093ab681236f423cf268bfefe38a5d690130.tar.gz |
Cleanup asserts in SecBlock
SecBlock regularly uses NULL pointers rather returning non-NULL 0-sized pointers. The asserts were moved to AlignedAllocate and UnalignedAllocate.
Diffstat (limited to 'allocate.cpp')
-rw-r--r-- | allocate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/allocate.cpp b/allocate.cpp index 4ed052f0..745eb781 100644 --- a/allocate.cpp +++ b/allocate.cpp @@ -74,6 +74,8 @@ void AlignedDeallocate(void *p) // Guard pointer due to crash on AIX when CRYPTOPP_NO_ALIGNED_ALLOC
// is in effect. The guard was previously in place in SecBlock,
// but it was removed at f4d68353ca7c as part of GH #875.
+ CRYPTOPP_ASSERT(p);
+
if (p != NULLPTR)
{
#ifdef CRYPTOPP_MM_MALLOC_AVAILABLE
|