bignerdranch / Freddy

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

JSONFromString() does crash on certain inputs. #199

Closed nst closed 8 years ago

nst commented 8 years ago

Steps to reproduce

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

" "
"[0,"
"{\"\":"

Expected behavior

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

Actual behavior

JSONFromString() does crash.

jeremy-w commented 8 years ago

Please add a backtrace for the crash and include the version in use.

jgallagher commented 8 years ago

Not necessary in this case - crash is trivially reproducible on master; fixed in #200. Thanks @nst!

jeremy-w commented 8 years ago

:+1: Thanks @jgallagher & @nst.