Looks like overflow checks not being by IonParser can result in one of outcomes:
an Ion RuntimeException being thrown, when method getIntValue() is called with value beyond 32-bit int range
quiet truncation of value without failure
Instead, this should be surfaced same as equivalent JsonParseException JSON-backed JsonParser throws in similar situation -- see ParserBase.convertNumberToInt() (and ParserBase.reportOverflowInt()) for examples of handling.
Same probably affects long overflow as well (wrt BigInteger range value)
Since I do not have time to work on adding coercion checks quite yet, will just add failing tests for future work.
Should be relatively straight-forward for someone to pick up.
(note: found via https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65180)
Looks like overflow checks not being by
IonParser
can result in one of outcomes:RuntimeException
being thrown, when methodgetIntValue()
is called with value beyond 32-bitint
rangeInstead, this should be surfaced same as equivalent
JsonParseException
JSON-backedJsonParser
throws in similar situation -- seeParserBase.convertNumberToInt()
(andParserBase.reportOverflowInt()
) for examples of handling.Same probably affects
long
overflow as well (wrtBigInteger
range value)