This repository has been archived by the owner. It is now read-only.

JSONFromString() does crash on certain inputs. #199

Closed
nst opened this Issue Aug 29, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@nst

nst commented Aug 29, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jeremy-w

jeremy-w Aug 30, 2016

Member

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

Member

jeremy-w commented Aug 30, 2016

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

@jgallagher

This comment has been minimized.

Show comment
Hide comment
@jgallagher

jgallagher Aug 30, 2016

Contributor

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

Contributor

jgallagher commented Aug 30, 2016

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

@jeremy-w

This comment has been minimized.

Show comment
Hide comment
@jeremy-w

jeremy-w Aug 30, 2016

Member

👍 Thanks @jgallagher & @nst.

Member

jeremy-w commented Aug 30, 2016

👍 Thanks @jgallagher & @nst.

cbrauchli added a commit to cbrauchli/Freddy that referenced this issue Sep 13, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.