-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JSONSerialization: fix a crash when an escape sequence contains low-surrogate code point without the corresponding high-surrogate code point #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci test |
08d08da
to
c1fae7b
Compare
@swift-ci test |
@spevans can you please re-trigger the build? Seems like it's stuck. |
@swift-ci test |
@jakepetroules is there anything else I can improve in this PR? |
LGTM, but please have @itaiferber review as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me! If you want to change the CocoaError
thing feel free, but otherwise I can merge
…urrogate code point without the corresponding high-surrogate code point
@swift-ci Please test and merge |
@swift-ci test and merge |
The triggering JSON:
[ "\uDFF3" ]
I've also added some tests. However, I couldn't run them, because the test suite crashes on this line:
https://github.com/apple/swift-corelibs-foundation/blob/b5d216e2ef7299faed12f404654f1f514eb8138a/TestFoundation/HTTPServer.swift#L581
And I have no idea why, but pretty sure my fix has nothing to do with it.
(In fact, in order to build TestFoundation, I needed to dance around a bit, because the
xdgTestHelper
target requires Swift 3 compatibility mode, which is not supported in the latest development snaphsot that I've been using.)