mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 12:52:51 +00:00
libi2pd: add missing size checks
This commit is contained in:
6 files changed
+69
-9
No files matched your search
@@ -944,6 +944,11 @@ namespace data
|
||||
void NetDb::HandleDatabaseLookupMsg (std::shared_ptr<const I2NPMessage> msg)
|
||||
{
|
||||
const uint8_t * buf = msg->GetPayload ();
|
||||
if (msg->GetPayloadLength () < 65)
|
||||
{
|
||||
LogPrint (eLogWarning, "NetDb: DatabaseLookup message is too short ", msg->GetPayloadLength ());
|
||||
return;
|
||||
}
|
||||
IdentHash ident (buf);
|
||||
if (ident.IsZero ())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user