explcitly define the max I2NP message ID value and validate against it

This commit is contained in:
jrandom
2004-06-29 19:28:40 +00:00
committed by zzz
parent 04373c5d1b
commit af81cf2c50
3 changed files with 15 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM
_context = context;
_log = context.logManager().getLog(I2NPMessageImpl.class);
_expiration = new Date(_context.clock().now() + DEFAULT_EXPIRATION_MS);
_uniqueId = _context.random().nextInt(Integer.MAX_VALUE);
_uniqueId = _context.random().nextLong(MAX_ID_VALUE);
}
/**