use RsTemporaryMemory in signature verification

This commit is contained in:
csoler 2016-04-30 17:33:47 -04:00
parent be7e87cb1e
commit 7914aeb60a
2 changed files with 2 additions and 4 deletions

View File

@ -376,10 +376,8 @@ bool GxsSecurity::validateNxsMsg(const RsNxsMsg& msg, const RsTlvKeySignature& s
RsTemporaryMemory allMsgData(allMsgDataLen) ;
if(!metaData || !allMsgData)
{
std::cerr << "(EE) Cannot allocate temporary memory for signature checking. Sizes=" << metaDataLen << ", " << allMsgDataLen << ". Out of memory??" << std::endl;
return false ;
}
msgMeta.serialise(metaData, &metaDataLen);
// copy msg data and meta in allmsgData buffer

View File

@ -13,7 +13,7 @@ void *rs_malloc(size_t size)
if(size > SAFE_MEMALLOC_THRESHOLD)
{
std::cerr << "(EE) Memory allocation error. A chunk of size 0 was requested. Callstack:" << std::endl;
std::cerr << "(EE) Memory allocation error. A chunk of size larger than " << SAFE_MEMALLOC_THRESHOLD << " was requested. Callstack:" << std::endl;
print_stacktrace() ;
return NULL ;
}