fix null pointer dereference in class Claim #1223

Open
ekinzie wants to merge 1 commit from ekinzie/ekinzie/null-release-time into master
ekinzie commented 2021-10-10 02:51:55 +02:00 (Migrated from github.com)

releaseTimeString can be initialized to null. Check for this case before
trying to parse it.

PR Checklist

Please check all that apply to this PR using "x":

  • [ x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • [ x] I have checked that this PR does not introduce a breaking change
  • [ x] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • [ x] Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number:

What is the current behavior?

Application crashes when playing some videos.

What is the new behavior?

Application continues even if release time string is not found.

Other information

releaseTimeString can be initialized to null. Check for this case before trying to parse it. ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [ x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ x] I have checked that this PR does not introduce a breaking change - [ x] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [ x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Issue Number: ## What is the current behavior? Application crashes when playing some videos. ## What is the new behavior? Application continues even if release time string is not found. ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ekinzie/ekinzie/null-release-time:ekinzie/ekinzie/null-release-time
git checkout ekinzie/ekinzie/null-release-time

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout master
git merge --no-ff ekinzie/ekinzie/null-release-time
git checkout ekinzie/ekinzie/null-release-time
git rebase master
git checkout master
git merge --ff-only ekinzie/ekinzie/null-release-time
git checkout ekinzie/ekinzie/null-release-time
git rebase master
git checkout master
git merge --no-ff ekinzie/ekinzie/null-release-time
git checkout master
git merge --squash ekinzie/ekinzie/null-release-time
git checkout master
git merge --ff-only ekinzie/ekinzie/null-release-time
git checkout master
git merge ekinzie/ekinzie/null-release-time
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1223
No description provided.