Skip to content

Engine.Execute can throw many unexpected exceptions #571

Closed

Description

@Metalnem

Engine.Execute can throw many unexpected exceptions (JavaScriptException and ParserException are expected for malformed inputs) when executing scripts from the attached archive. These are:

  • ArgumentOutOfRangeException
  • IndexOutOfRangeException
  • InvalidCastException
  • InvalidOperationException
  • NullReferenceException
  • OverflowException

You can run the following code to reproduce it (the path variable should contain the path to one of the extracted files):

var text = File.ReadAllText(path);
new Engine().Execute(text);

Found via SharpFuzz.

Activity

  1. added a commit that references this issue on May 28, 2019
    72b20ac
  2. lahma commented on May 28, 2019

    @lahma
    Collaborator

    Thank you for reporting these. We've created fixes for both Jint and Esprima .NET and they should now cover the cases you've reported, closing the issue.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions