[Webkit-unassigned] [Bug 144047] New: VisibleSelection should only accept Range by reference

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 22 09:32:13 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=144047

            Bug ID: 144047
           Summary: VisibleSelection should only accept Range by reference
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bfulgham at webkit.org

One of the available VisibleSelection constructors accepts a Range pointer. However, it immediately dereferences the pointer to access members, resulting in runtime crashes if an unwitting developer passes an unchecked Range pointer.

Since a nullptr is not valid input for this constructor, we should change the interface to require a reference. The code already must do null checks before passing Range pointers to this constructor, so simply changing this code to dereference the pointer is a trivial mechanical change.

This will make it harder to accidentally code an unsafe use of VisibleSelection.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150422/26c76dd4/attachment.html>


More information about the webkit-unassigned mailing list