mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-11-22 11:47:17 +00:00
check RouterInfo store msg buffer size before extracting size
This commit is contained in:
1 parent
9a284ac7e5
commit
0c8c0e85a7
1 file changed
+5
@@ -903,6 +903,11 @@ namespace data
|
||||
{
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint (eLogDebug, "NetDb: Store request: RouterInfo ", ident.ToBase64());
|
||||
if (offset + 2 > len)
|
||||
{
|
||||
LogPrint (eLogError, "NetDb: RouterInfo store msg is too short ", len);
|
||||
return;
|
||||
}
|
||||
size_t size = bufbe16toh (buf + offset);
|
||||
offset += 2;
|
||||
if (size > MAX_RI_BUFFER_SIZE || size > len - offset)
|
||||
|
||||
Reference in new issue
Block a user