RESOLVED FIXED 260055
AX: -[WebAccessibilityObjectWrapper attributedStringForNSRange:] should exit early for ranges of zero length
https://bugs.webkit.org/show_bug.cgi?id=260055
Summary AX: -[WebAccessibilityObjectWrapper attributedStringForNSRange:] should exit ...
Tyler Wilcock
Reported 2023-08-10 20:50:40 PDT
...
Attachments
Patch (2.04 KB, patch)
2023-08-10 21:28 PDT, Tyler Wilcock
no flags
Patch (2.02 KB, patch)
2023-08-17 17:19 PDT, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2023-08-10 20:50:49 PDT
Tyler Wilcock
Comment 2 2023-08-10 20:51:03 PDT
Tyler Wilcock
Comment 3 2023-08-10 21:28:49 PDT
Andres Gonzalez
Comment 4 2023-08-11 11:23:02 PDT
(In reply to Tyler Wilcock from comment #3) > Created attachment 467243 [details] > Patch --- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm +++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm + auto attributedString = backingObject->attributedStringForTextMarkerRange(backingObject->textMarkerRangeForNSRange(range), AXCoreObject::SpellCheck::Yes); + if (![attributedString length]) + return nil; + + return attributedString.autorelease(); Looks good, just consider the 2 liner: auto attributedString = backingObject->attributedStringForTextMarkerRange(backingObject->textMarkerRangeForNSRange(range), AXCoreObject::SpellCheck::Yes); return [attributedString length] ? attributedString.autorelease() : nil;
Tyler Wilcock
Comment 5 2023-08-17 17:16:25 PDT
Tyler Wilcock
Comment 6 2023-08-17 17:19:14 PDT
EWS
Comment 7 2023-08-18 10:48:52 PDT
Committed 267045@main (f4896f6e7c4b): <https://commits.webkit.org/267045@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 467318 [details].
Note You need to log in before you can comment on or make changes to this bug.