mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
use RsTemporaryMemory in signature verification
This commit is contained in:
parent
be7e87cb1e
commit
7914aeb60a
@ -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
|
||||
|
@ -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 ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user