Ratchet: Fix NPE ratcheting IB NSR tagset

This commit is contained in:
zzz
2020-05-01 14:04:14 +00:00
parent 788c72c331
commit eab688b0bc
3 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,8 @@
2020-05-01 zzz
* Ratchet: Fix NPE ratcheting IB NSR tagset
2020-04-30 zzz 2020-04-30 zzz
* i2ptunnel: Prevent changing enc type on running tunnel
* Ratchet: Error handling fixes * Ratchet: Error handling fixes
* Streaming: Westwood+ congestion control (ticket #2719) * Streaming: Westwood+ congestion control (ticket #2719)

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 14; public final static long BUILD = 15;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";

View File

@ -450,9 +450,12 @@ class RatchetTagSet implements TagSetHandle {
int toTrim = 0; int toTrim = 0;
int tagnum; int tagnum;
while ((tagnum = _sessionTags.keyAt(toTrim)) < tooOld) { while ((tagnum = _sessionTags.keyAt(toTrim)) < tooOld) {
int kidx = _sessionKeys.indexOfKey(tagnum); if (_sessionKeys != null) {
if (kidx >= 0) // only for ES tagsets
_sessionKeys.removeAt(kidx); int kidx = _sessionKeys.indexOfKey(tagnum);
if (kidx >= 0)
_sessionKeys.removeAt(kidx);
}
if (_lsnr != null) if (_lsnr != null)
_lsnr.expireTag(_sessionTags.valueAt(toTrim), this); _lsnr.expireTag(_sessionTags.valueAt(toTrim), this);
toTrim++; toTrim++;