Skip to content

panic in convert_error for unreasonably long lines #1867

@matt-phylum

Description

@matt-phylum

One of my coworkers found that since rust-lang/rust#136932 (Rust 1.87), there is a footgun where even though you can pass a usize number of characters to fmt, there is a an upper limit of 0xffff, and anything higher than that results in a panic. This affects nom's convert_error function when an error is found more than 0xffff bytes from the start of the line, because convert_error will try output that many spaces using the format specifier.

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