Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine.Execute can throw many unexpected exceptions #571

Closed
Metalnem opened this issue Dec 24, 2018 · 1 comment
Closed

Engine.Execute can throw many unexpected exceptions #571

Metalnem opened this issue Dec 24, 2018 · 1 comment

Comments

@Metalnem
Copy link

@Metalnem Metalnem commented Dec 24, 2018

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.

@lahma
Copy link
Collaborator

@lahma lahma commented May 28, 2019

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.

@lahma lahma closed this May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants