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

ScriptEngine.Execute throws some unexpected exceptions #142

Closed
Metalnem opened this issue Jan 21, 2019 · 2 comments
Closed

ScriptEngine.Execute throws some unexpected exceptions #142

Metalnem opened this issue Jan 21, 2019 · 2 comments
Labels

Comments

@Metalnem
Copy link

ScriptEngine.Execute can throw many unexpected exceptions. Here are the types of exceptions it can throw and the code snippets used to trigger them:

ArgumentException

new ScriptEngine().Execute("if(5 .toString(3)==0)(0)");

ArgumentOutOfRangeException

new ScriptEngine().Execute("new Date(0,0)");

IndexOutOfRangeException

new ScriptEngine().Execute("delete[].(0)");

InvalidCastException

new ScriptEngine().Execute("({[0](");

NullReferenceException

new ScriptEngine().Execute("function a(){for(a=0;a<0;0++)0}");

Found via SharpFuzz.

@paulbartrum
Copy link
Owner

Thanks for doing this, this is really helpful. I've checked in a few fixes already, with more to come.

@paulbartrum
Copy link
Owner

These should all now be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants