Browse Source

Added bounds checking to NetDb::HandleDatabaseSearchReplyMsg().

pull/1941/head
Chad Fraleigh 1 year ago
parent
commit
e8b4e971f9
No known key found for this signature in database
GPG Key ID: 2415C39758458A8F
  1. 4
      libi2pd/NetDb.cpp

4
libi2pd/NetDb.cpp

@ -952,6 +952,10 @@ namespace data @@ -952,6 +952,10 @@ namespace data
else if(!m_FloodfillBootstrap)
LogPrint (eLogWarning, "NetDb: Requested destination for ", key, " not found");
// All peers hashs in buffer?
if(msg->GetPayloadLength() < (size_t) (33 + num * IDENTITY_HASH_SIZE))
return;
// try responses
for (int i = 0; i < num; i++)
{

Loading…
Cancel
Save