mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-06 14:18:27 +00:00
don't overflow int when parsing SAM version
This commit is contained in:
@@ -92,6 +92,7 @@ namespace client
|
||||
{
|
||||
if (ch >= '0' && ch <= '9')
|
||||
{
|
||||
if (version > MAX_SAM_VERSION_VALUE) continue; // don't overflow on a long number
|
||||
version *= 10;
|
||||
version += (ch - '0');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user