mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix pqiSSLstore::encryptedSendItems empty list
RsTemporaryMemory was complaining of being initialized with size 0 in case of empty list was passed to the method, this is a legitimate use case when one want have an empty list as state, so in this case pass 1 as argument to RsTemporaryMemory constructor
This commit is contained in:
parent
828792f2b5
commit
748e75d3e1
@ -394,10 +394,9 @@ bool pqiSSLstore::encryptedSendItems(const std::list<RsItem*>& rsItemList)
|
||||
uint32_t offset = 0;
|
||||
|
||||
for(it = rsItemList.begin(); it != rsItemList.end(); ++it)
|
||||
if(*it != NULL)
|
||||
sizeItems += rsSerialiser->size(*it);
|
||||
if(*it != NULL) sizeItems += rsSerialiser->size(*it);
|
||||
|
||||
RsTemporaryMemory data(sizeItems) ;
|
||||
RsTemporaryMemory data( sizeItems ? sizeItems : 1 );
|
||||
|
||||
for(it = rsItemList.begin(); it != rsItemList.end(); ++it)
|
||||
if(*it != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user