SSU2: Data phase fix

Fix initialization of IMS when receiving last fragment first
This commit is contained in:
zzz
2022-03-02 09:37:10 -05:00
parent 7b6e6270ba
commit 0e89b07ae8

View File

@ -115,7 +115,7 @@ class InboundMessageState implements CDQEntry {
if (isLast) {
if (fragmentNum > MAX_FRAGMENTS)
throw new DataFormatException("corrupt - too many fragments: " + fragmentNum);
_fragments = new ByteArray[fragmentNum];
_fragments = new ByteArray[fragmentNum + 1];
} else {
_fragments = new ByteArray[MAX_FRAGMENTS];
}