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:
chrisparker126 2011-04-11 19:07:30 +00:00
parent 5b74d957c0
commit 2dbd6f4380

View File

@ -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;
} }