disallow empty file when loading shared file list in order to avoid malloc of size 0

This commit is contained in:
csoler 2018-07-31 14:13:01 +02:00
parent 1297d2e106
commit ecd45215c7
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

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