mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
removed potential seg fault with decrypting cache file
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4154 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5b74d957c0
commit
2dbd6f4380
@ -784,13 +784,13 @@ bool p3GroupDistrib::locked_loadHistoryCacheFile()
|
|||||||
|
|
||||||
char* buffer = static_cast<char*>(pugi::get_memory_allocation_function()(outlen));
|
char* buffer = static_cast<char*>(pugi::get_memory_allocation_function()(outlen));
|
||||||
|
|
||||||
|
if(ok){
|
||||||
memcpy(buffer, decryptedCacheFile, outlen);
|
memcpy(buffer, decryptedCacheFile, outlen);
|
||||||
|
|
||||||
|
|
||||||
ok &= mCacheDoc.load_buffer_inplace_own(buffer, outlen);
|
ok &= mCacheDoc.load_buffer_inplace_own(buffer, outlen);
|
||||||
|
delete[] decryptedCacheFile;
|
||||||
|
}
|
||||||
|
|
||||||
delete[] fileLoadBuffer;
|
delete[] fileLoadBuffer;
|
||||||
delete[] decryptedCacheFile;
|
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user