Skip to content

Unsafe unwrap in parser #363

@RadicalZephyr

Description

@RadicalZephyr

Found with the new fuzz testing setup!

This input export\x09AA causes the Lexer to fail.

extern crate just;

fn lex_and_parse<'a>(input: &'a str) -> Result<(), just::CompilationError<'a>> {
  let tokens = just::Lexer::lex(input)?;
  let parser = just::Parser::new(input, tokens);
  let _justfile = parser.justfile()?;
  Ok(())
}

fn main() {
  let input = "export	AA";
  lex_and_parse(&input);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions