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

@smoelius

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions