Skip to content

Out of bounds access when parsing 0 at end of input #106

@dtolnay

Description

@dtolnay

Adding assert!(self.index < self.length) to Parse::read_byte catches this.

Example inputs that trigger the bug:

  • 0
  • -0
  • [0
  • {"":0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions