A11y: Fix fuzzer-identified infinite loop
This change fixes an infinite loop in `OneShotAccessibilityTreeSearch`. If the search starts at the root of a tree, goes backwards, and wraps around to the last node, it will loop forever in `SearchByWalkingTree`. The problem is that `stop_node` is set to NULL, so it is never matched. The fix is to ensure that stop_node gets set to the root element (i.e., the start_node) so that we don't loop through the tree more than once. Bug: 1001200 Change-Id: I67d8abd5e6044b2a125a633d39c7581e45cc7411 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790255Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:
Kevin Babbitt <kbabbitt@microsoft.com> Commit-Queue: Ian Prest <iapres@microsoft.com> Cr-Commit-Position: refs/heads/master@{#695764}
Showing
Please register or sign in to comment