Fix for JSIP-519: OriginFieldParser skips session id and session version #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although SDP RFC 4566 does not limit the sess-id and sess-version field the NIST implementation of gov.nist.javax.sdp.parser.OriginFieldParser limits the fields to 18 digits.
This has been done because the jain.sip API used a Java long field for the session-id and session-version.
Unfortunately the JAVA long allows up to 19 digits (see Long.MAX_VALUE) which means that the SDP parser does not allow the full possible range of values to be used with JAVA long.
The Mozilla Firefox Browser in WebRTC environment created SDP containing the session-id value using the full range for the long value and therefore the first digit may be cut by the current code of OriginFieldParser.java.
My attached simple patch allows to use the full value range of Long.MAX_VALUE.