Summary: | Possible null Range dereference under AXObjectCache::visiblePositionFromCharacterOffset() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | Accessibility | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, enrica, jcraig, jdiggs, mario, n_wang, rniwa, samuel_white, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 158138 | ||||||
Attachments: |
|
Description
Chris Dumez
2016-06-30 21:30:16 PDT
Created attachment 282511 [details]
Patch
Comment on attachment 282511 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282511&action=review Can you please try to write a test before landing? > Source/WebCore/accessibility/AXObjectCache.cpp:1961 > + auto range = rangeForUnorderedCharacterOffsets(characterOffset, characterOffset); Honestly, this auto is making this code worse. I would prefer if you used the type. + cfleizach / n_wang in case they know how to write a test for this as I have no idea. (In reply to comment #4) > + cfleizach / n_wang in case they know how to write a test for this as I > have no idea. There are some existing text marker range tests. My guess is you could make some invalid text marker ranges and pass into the api that calls into this method to recreate (In reply to comment #5) > (In reply to comment #4) > > + cfleizach / n_wang in case they know how to write a test for this as I > > have no idea. > > There are some existing text marker range tests. My guess is you could make > some invalid text marker ranges and pass into the api that calls into this > method to recreate OK, it looks like I have a test, thanks. (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > + cfleizach / n_wang in case they know how to write a test for this as I > > > have no idea. > > > > There are some existing text marker range tests. My guess is you could make > > some invalid text marker ranges and pass into the api that calls into this > > method to recreate > > OK, it looks like I have a test, thanks. Actually no, the crash was in WKTR code. Comment on attachment 282511 [details] Patch Clearing flags on attachment: 282511 Committed r202762: <http://trac.webkit.org/changeset/202762> All reviewed patches have been landed. Closing bug. |