1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

Merge pull request #1898 from Vort/reseed_fixes

Reseed fixes
This commit is contained in:
orignal 2023-03-03 14:41:04 -05:00 committed by GitHub
commit d6ed9152ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -431,8 +431,8 @@ namespace data
} }
// try reseeding from floodfill first if specified // try reseeding from floodfill first if specified
std::string riPath; std::string riPath; i2p::config::GetOption("reseed.floodfill", riPath);
if(i2p::config::GetOption("reseed.floodfill", riPath)) if (!riPath.empty())
{ {
auto ri = std::make_shared<RouterInfo>(riPath); auto ri = std::make_shared<RouterInfo>(riPath);
if (ri->IsFloodfill()) if (ri->IsFloodfill())

View File

@ -320,7 +320,7 @@ namespace data
uint16_t fileNameLength, extraFieldLength; uint16_t fileNameLength, extraFieldLength;
s.read ((char *)&fileNameLength, 2); s.read ((char *)&fileNameLength, 2);
fileNameLength = le16toh (fileNameLength); fileNameLength = le16toh (fileNameLength);
if ( fileNameLength > 255 ) { if ( fileNameLength >= 255 ) {
// too big // too big
LogPrint(eLogError, "Reseed: SU3 fileNameLength too large: ", fileNameLength); LogPrint(eLogError, "Reseed: SU3 fileNameLength too large: ", fileNameLength);
return numFiles; return numFiles;