mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-21 16:49:10 +01:00
RouterInfo file size fix
This commit is contained in:
parent
11e11df5ca
commit
a46f311762
1 changed files with 5 additions and 1 deletions
|
@ -47,6 +47,10 @@ namespace data
|
||||||
{
|
{
|
||||||
s.seekg (0,std::ios::end);
|
s.seekg (0,std::ios::end);
|
||||||
m_BufferLen = s.tellg ();
|
m_BufferLen = s.tellg ();
|
||||||
|
if (m_BufferLen < 40)
|
||||||
|
{
|
||||||
|
LogPrint("File", filename, " is malformed");
|
||||||
|
}
|
||||||
s.seekg(0, std::ios::beg);
|
s.seekg(0, std::ios::beg);
|
||||||
s.read(m_Buffer,m_BufferLen);
|
s.read(m_Buffer,m_BufferLen);
|
||||||
ReadFromBuffer ();
|
ReadFromBuffer ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue