bignerdranch / Freddy

A reusable framework for parsing JSON in Swift.
MIT License
1.09k stars 120 forks source link

JSONFromString() does crash on certain inputs. #206

Closed nst closed 7 years ago

nst commented 8 years ago

Step to reproduce

Run JSONFromString() with the following Swift string as input:

"[\"\\"

Expected behavior

Since this strings is invalid JSON according to RFC 7159, JSONFromString() should throw an error.

Actual behavior

JSONFromString() does crash.

jgallagher commented 7 years ago

Fixed by #216.