mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 00:01:43 +00:00
fix: missing checks and limits
This commit is contained in:
9 files changed
+46
-8
No files matched your search
+1
-1
@@ -272,7 +272,7 @@ namespace util
|
||||
{
|
||||
if (!len) return { };
|
||||
uint8_t l = buf[0];
|
||||
if (l > len) l = len;
|
||||
if (l > len - 1) l = len - 1;
|
||||
return { (const char *)(buf + 1), l };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user