Skip to content

IonParser.getIntValue() fails or does not handle value overflow checks #428

Description

@cowtowncoder

(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:

  • 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    has-failing-testIndicates that there exists a test case (under `tofix/`) to reproduce the issueion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions