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

[Tizen.Log] Fix null reference exception #5419

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Conversation

ppdl
Copy link
Contributor

@ppdl ppdl commented Jul 27, 2023

When a null string comes, replace it with empty string so that not to throw null reference exception.

Description of Change

If a string parameter is null, then s.Length fails, throwing null reference exception. In addition, Encoding.GetBytes() will throw ArgumentNullException when it receives null char *. To fix it, replace all null string with empty string, which can be handled as an object.

API Changes

  • ACR:

@github-actions github-actions bot added the API11 Platform : Tizen 8.0 / TFM: net6.0-tizen8.0 label Jul 27, 2023
@ppdl ppdl requested a review from chanwoochoi July 28, 2023 04:03
Copy link
Contributor

@chanwoochoi chanwoochoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

When a null string comes, replace it with empty string so that not to
throw null reference exception.

Signed-off-by: Youngjae Cho <[email protected]>
@chanwoochoi chanwoochoi merged commit e29cc74 into Samsung:master Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API11 Platform : Tizen 8.0 / TFM: net6.0-tizen8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants