Work around crash in Google Chrome when navigating tweets on twitter.com#8779
Merged
Conversation
…n twitter.com due to IAccessible2_2::relationTargetsOfType buffer overrunning.
Member
Author
|
As this is a crash introduced in the 2018.3 release cycle, this should be made available in a 2018.3 minor release. |
feerrenrut
suggested changes
Sep 25, 2018
| // Therefore, If this is Chrome, request all targets (by setting numRelations to 0) as this works around the bug. | ||
| // There is no major performance hit to fetch all targets in Chrome as Chrome is already fetching all targets either way. | ||
| // In Firefox there would be extra cross-proc calls. | ||
| if(this->toolkitName.compare(L"Chrome")==0) { |
Contributor
There was a problem hiding this comment.
toolkitName might be null. This function should probably check for this.
Member
Author
|
toolkitName is an std::wstring. It could be empty, but never null.
compare simply won't return 0 if it is empty.
|
Contributor
|
Oh, of course it is. But then its assigned from a |
Member
Author
|
Done now.
|
feerrenrut
approved these changes
Sep 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #8777
Summary of the issue:
Google Chrome crashes when navigating tweets in twitter.com due to a buffer overrun in Chrome's implementation of IAccessible2_2::relationTargetsOfType.
NVDA started calling relationTargetsOfType in pr #8352.
Description of how this pull request fixes the issue:
This PR works around the crash by making use of the fact that chrome's relationTargetsOftype works okay when requesting all targets (numRelations is 0) rather than a specific number of them that may be smaller than the total amount.
Testing performed:
Tested NVDA and Chrome using the testcases in #8777.
And again with tests in pr #8352
Known issues with pull request:
None.
Change log entry:
Already in PR.