Title: [279353] trunk/Source/WebKit
Revision
279353
Author
[email protected]
Date
2021-06-28 17:21:51 -0700 (Mon, 28 Jun 2021)

Log Message

Nullptr crash in ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement
https://bugs.webkit.org/show_bug.cgi?id=227462
rdar://50772934

Reviewed by Chris Dumez.

Return early if statement cannot be created.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
(WebKit::ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (279352 => 279353)


--- trunk/Source/WebKit/ChangeLog	2021-06-28 23:56:54 UTC (rev 279352)
+++ trunk/Source/WebKit/ChangeLog	2021-06-29 00:21:51 UTC (rev 279353)
@@ -1,3 +1,17 @@
+2021-06-28  Sihui Liu  <[email protected]>
+
+        Nullptr crash in ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement
+        https://bugs.webkit.org/show_bug.cgi?id=227462
+        rdar://50772934
+
+        Reviewed by Chris Dumez.
+
+        Return early if statement cannot be created.
+
+        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+        (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
+        (WebKit::ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement):
+
 2021-06-28  Brent Fulgham  <[email protected]>
 
         REGRESSION (r279305) [Mac DEBUG] 4 SOAuthorizationRedirect Tests are Crashing with Assert: !m_sheetWindow

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (279352 => 279353)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2021-06-28 23:56:54 UTC (rev 279352)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2021-06-29 00:21:51 UTC (rev 279353)
@@ -1057,6 +1057,7 @@
         || insertRelationshipStatement->bindInt(1, domainID) != SQLITE_OK) {
             ITP_RELEASE_LOG_ERROR(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList failed, error message: %" PRIVATE_LOG_STRING, this, m_database.lastErrorMsg());
             ASSERT_NOT_REACHED();
+            return;
     }
     
     if (statement.contains("REPLACE")) {
@@ -3504,6 +3505,7 @@
     if (!attributedScopedStatement) {
         ITP_RELEASE_LOG_ERROR(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString, error message: %" PRIVATE_LOG_STRING, this, m_database.lastErrorMsg());
         ASSERT_NOT_REACHED();
+        return { };
     }
 
     Vector<WebCore::PrivateClickMeasurement> attributions;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to