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

Add bounds checking to notification styles #13216

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

jkmassel
Copy link
Contributor

Fixes a crash that can happen when given invalid ranges – if the range extended past the end of the string, the app would crash. That doesn't happen anymore.

Fixes #

To test:

  • Comment out the bounds check, run the new test, see that the app crashes
  • Un-comment out the bounds check, run the tests again, see that they pass.

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Fixes a crash that can happen when given invalid ranges
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 10, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 10, 2020

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

Copy link
Member

@rachelmcr rachelmcr left a comment

Choose a reason for hiding this comment

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

This tests well and based on my understanding of how this formatting works, the change looks good to me. Thanks!

Copy link
Contributor

@loremattei loremattei left a comment

Choose a reason for hiding this comment

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

LGTM!

@jkmassel jkmassel merged commit 9106f02 into develop Jan 23, 2020
@jkmassel jkmassel deleted the fix/notification-styles-out-of-bounds-crash branch January 23, 2020 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants