diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2016-02-09 16:37:19 -0500 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2016-02-09 16:37:19 -0500 |
| commit | 823bc93357da32a3a4a2b71b9915a4e124839d18 (patch) | |
| tree | 9551821f88f90664c35326e5bdd3db94ef8470af /rijndael.cpp | |
| parent | b773052b3d58021498e62eab0e10ad953ad6c77a (diff) | |
| download | cryptopp-git-823bc93357da32a3a4a2b71b9915a4e124839d18.tar.gz | |
Add call for _malloca/_freea. They are SDLC compliance items on Windows platform
Diffstat (limited to 'rijndael.cpp')
| -rw-r--r-- | rijndael.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/rijndael.cpp b/rijndael.cpp index 2fee3b6d..f394960d 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -1232,13 +1232,12 @@ size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo size_t regSpill, lengthAndCounterFlag, keysBegin;
};
- size_t increment = BLOCKSIZE;
const byte* zeros = (byte *)(Te+256);
- byte *space;
+ byte *space = NULL;
do {
+#if (CRYPTOPP_MSC_VERSION >= 1400)
// https://msdn.microsoft.com/en-us/library/5471dc8s.aspx
-#if (CRYPTOPP_MSC_VERION >= 1400)
space = (byte *)_malloca(255+sizeof(Locals));
space += (256-(size_t)space%256)%256;
#else
@@ -1248,6 +1247,7 @@ size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo }
while (AliasedWithTable(space, space+sizeof(Locals)));
+ size_t increment = BLOCKSIZE;
if (flags & BT_ReverseDirection)
{
assert(length % BLOCKSIZE == 0);
@@ -1274,6 +1274,11 @@ size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo locals.keysBegin = (12-keysToCopy)*16;
Rijndael_Enc_AdvancedProcessBlocks(&locals, m_key);
+
+#if (CRYPTOPP_MSC_VERSION >= 1400)
+ _freea(space);
+#endif
+
return length % BLOCKSIZE;
}
#endif
|
