Shopify / mruby-engine

MRuby engine is a sandboxed scripting engine.
MIT License
80 stars 18 forks source link

Deal with exception raised while parsing #19

Closed alexsnaps closed 7 years ago

alexsnaps commented 7 years ago

Sorry, looks like this broke something

in-the-mood-for-mov commented 7 years ago

Looks nice. What do you think of declaring proc = NULL at the top of the function, having

done:
  mrb_parser_free(parser_state);
  return proc;

and using goto done; on error?

in-the-mood-for-mov commented 7 years ago

Feel free to ignore my suggestion if you do not think it improves the code.

clayton-shopify commented 7 years ago

This fixes https://hackerone.com/reports/180695.