Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Byte overflow leading to index-out-of-bounds exception #3

Description

@smoelius

Consider changing these instances of Byte to Integer:

List<Byte> digits = new ArrayList<Byte>();

and eliminating this cast:

It is easy to overflow a Byte. Moreover, because a Byte is signed, an overflow can result in a negative value and an ArrayIndexOutOfBoundsException on this line:

Such was the case with a corpus I was using.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions