Title: [175353] trunk/Source/WebKit2
Revision
175353
Author
[email protected]
Date
2014-10-29 16:13:15 -0700 (Wed, 29 Oct 2014)

Log Message

Null deref under performActionMenuHitTestAtLocation
https://bugs.webkit.org/show_bug.cgi?id=138197
<rdar://problem/18817803>

Reviewed by Beth Dakin.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Null-check the expanded range.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (175352 => 175353)


--- trunk/Source/WebKit2/ChangeLog	2014-10-29 23:02:10 UTC (rev 175352)
+++ trunk/Source/WebKit2/ChangeLog	2014-10-29 23:13:15 UTC (rev 175353)
@@ -1,3 +1,15 @@
+2014-10-29  Tim Horton  <[email protected]>
+
+        Null deref under performActionMenuHitTestAtLocation
+        https://bugs.webkit.org/show_bug.cgi?id=138197
+        <rdar://problem/18817803>
+
+        Reviewed by Beth Dakin.
+
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::scanForDataDetectedItems):
+        Null-check the expanded range.
+
 2014-10-28  Ada Chan  <[email protected]>
 
         Implement WKPageSetMuted(bool).

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (175352 => 175353)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-10-29 23:02:10 UTC (rev 175352)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-10-29 23:13:15 UTC (rev 175353)
@@ -1072,6 +1072,9 @@
         position = firstPositionInOrBeforeNode(node);
 
     RefPtr<Range> contextRange = rangeExpandedAroundPosition(position, 4);
+    if (!contextRange)
+        return nullptr;
+
     String fullPlainTextString = plainText(contextRange.get());
     int hitLocation = TextIterator::rangeLength(makeRange(contextRange->startPosition(), position).get());
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to