iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2019 02:55:03 +0000 (02:55 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2019 02:55:03 +0000 (02:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193996

Reviewed by Wenson Hsieh.

Added a missing nullptr check.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

index bc81a08..879f9d8 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-29  Ryosuke Niwa  <rniwa@webkit.org>
+
+        iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element for data list
+        https://bugs.webkit.org/show_bug.cgi?id=193996
+
+        Reviewed by Wenson Hsieh.
+
+        Added a missing nullptr check.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::getPositionInformation):
+
 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
 
         Add nodes to the scrolling tree in z-index order.
index fac629b..d894467 100644 (file)
@@ -2248,7 +2248,7 @@ void WebPage::getPositionInformation(const InteractionInformationRequest& reques
 
     // Prevent the callout bar from showing when tapping on the datalist button.
 #if ENABLE(DATALIST_ELEMENT)
-    if (is<HTMLInputElement>(*hitNode)) {
+    if (is<HTMLInputElement>(hitNode)) {
         const HTMLInputElement& input = downcast<HTMLInputElement>(*hitNode);
         if (input.list()) {
             HitTestResult result = m_page->mainFrame().eventHandler().hitTestResultAtPoint(request.point, HitTestRequest::ReadOnly | HitTestRequest::Active);