Closed msantos closed 12 years ago
@msantos I wish I noticed this PR last week. I fixed a few bugs in erlang_js that were causing segfaults on otp 15B and having never looked at the erlang_js code I didn't know we were so vulnerable to OOM. Thanks for the PR, I'll try and look at this after our next release.
Thanks for looking at it! I've reapplied my patches on top of your changes.
+1
+1
+1 Looks good.
It might be nice for maintenance to peek at (driver_comm.c, 37) using the copy_string() function here instead of the bare code if it's safe (it looks ilke we're still dealing with NULL-terminated strings).
Not created in this change, but copy_string() might be better-named ejs_strdup() to be more consistent with the standard library in a future pass.
Some small safety fixes, if anything looks weird or you'd like some changes, please let me know! I've run the tests and everything passed.