hadashiA / sexpression

s-expression parser for javascript
16 stars 4 forks source link

Invalid input handling #1

Open baskerville opened 10 years ago

baskerville commented 10 years ago

The following:

s = require('sexpression')
s.parse('(#)')

triggers an infinite loop.

jpolitz commented 10 years ago

I believe I noticed the same thing --- on node 0.10,26, I get FATAL ERROR: JS Allocation failed - process out of memory for

var sexp = require("sexpression");

sexp.parse("('a' 5)");
hadashiA commented 10 years ago

Oh.. this error It is fatal. I will try fix it. (Or welcome to pull request)

However, (#) and ('a' 5) is not invalid s-expression?