There was an error while loading. Please reload this page.
1 parent 5860a09 commit 05437c1Copy full SHA for 05437c1
1 file changed
libi2pd/LeaseSet.cpp
@@ -398,6 +398,10 @@ namespace data
398
std::shared_ptr<LocalDestination> dest)
399
{
400
size_t offset = 0;
401
+
402
+ if(offset + 2 > len) // AKA (len < 2)
403
+ return 0;
404
405
// properties
406
uint16_t propertiesLen = bufbe16toh (buf + offset); offset += 2;
407
offset += propertiesLen; // skip for now. TODO: implement properties
@@ -477,6 +481,10 @@ namespace data
477
481
size_t LeaseSet2::ReadMetaLS2TypeSpecificPart (const uint8_t * buf, size_t len)
478
482
479
483
484
485
486
487
480
488
489
490
0 commit comments