Skip to content
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

[Fix] Add checks to ensure PLCrashReportExceptionInfo has non-nil name and reason #298

Closed
wants to merge 1 commit into from

Conversation

ForeverQ
Copy link

@ForeverQ ForeverQ commented Feb 7, 2024

Description

We encountered a system exception crash here on Outlook iOS when copying PLCrashReport.exceptionInfo.exceptionReason but it was nil.

By going through the code, this can only happen when [NSString stringWithUTF8String:] returns nil here. Since the name and reason are desgined to be non-nil, this PR fixes this edge case by verifying them to be non-nil as expected.

@ForeverQ ForeverQ requested a review from a team as a code owner February 7, 2024 08:04
@MikhailSuendukov
Copy link
Contributor

Hello and thank you for contribution! I researched this trying to find out why stringWithUTF8String may return nil in cases when the argument is not NULL (as we already have such checks), and came across this thread, which indicates that it may happen indeed if the argument data is not formatted correctly. Do you think it is the case? Understanding actual cases where you've encountered this issue would be helpful for us.

@DmitriyKirakosyan
Copy link
Contributor

Closing. Please reopen if you are still interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants