mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
disallow empty file when loading shared file list in order to avoid malloc of size 0
This commit is contained in:
parent
1297d2e106
commit
ecd45215c7
@ -194,10 +194,10 @@ bool FileListIO::loadEncryptedDataFromFile(const std::string& fname,unsigned cha
|
||||
{
|
||||
uint64_t file_size ;
|
||||
|
||||
if(!RsDirUtil::checkFile( fname,file_size,false ) )
|
||||
if(!RsDirUtil::checkFile( fname,file_size,true ) )
|
||||
{
|
||||
#ifdef FIM_DEBUG
|
||||
std::cerr << "Encrypted file " << fname << " not available." << std::endl;
|
||||
std::cerr << "Encrypted file " << fname << " not available or empty." << std::endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user