libi2pd: add missing size checks

This commit is contained in:
jpk68 committed 2026-08-17 13:27:12 -04:00
1 parent d9cd383b08
commit 575acd6f13
6 files changed
+69 -9

No files matched your search

+5
View File
@@ -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 ())
{