mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -194,10 +194,10 @@ bool FileListIO::loadEncryptedDataFromFile(const std::string& fname,unsigned cha
|
|||||||
{
|
{
|
||||||
uint64_t file_size ;
|
uint64_t file_size ;
|
||||||
|
|
||||||
if(!RsDirUtil::checkFile( fname,file_size,false ) )
|
if(!RsDirUtil::checkFile( fname,file_size,true ) )
|
||||||
{
|
{
|
||||||
#ifdef FIM_DEBUG
|
#ifdef FIM_DEBUG
|
||||||
std::cerr << "Encrypted file " << fname << " not available." << std::endl;
|
std::cerr << "Encrypted file " << fname << " not available or empty." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user