mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04: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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue