Title: [271437] trunk/Source/WebCore
Revision
271437
Author
[email protected]
Date
2021-01-13 04:52:08 -0800 (Wed, 13 Jan 2021)

Log Message

[GStreamer][EME][Thunder] Bail out on failed response message for challenges
https://bugs.webkit.org/show_bug.cgi?id=220583

Reviewed by Philippe Normand.

When parsing the challenge message, sometimes the message length
is 0 and parsing fails. This should not happen in principle and
that's why we just asserted on that but it looks like the
framework is not as careful as expected here. Hence we need to
bail out to not crash in release mode.

* platform/graphics/gstreamer/eme/CDMThunder.cpp:
(WebCore::CDMInstanceSessionThunder::challengeGeneratedCallback):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271436 => 271437)


--- trunk/Source/WebCore/ChangeLog	2021-01-13 11:54:00 UTC (rev 271436)
+++ trunk/Source/WebCore/ChangeLog	2021-01-13 12:52:08 UTC (rev 271437)
@@ -1,3 +1,19 @@
+2021-01-13  Xabier Rodriguez Calvar  <[email protected]>
+
+        [GStreamer][EME][Thunder] Bail out on failed response message for challenges
+        https://bugs.webkit.org/show_bug.cgi?id=220583
+
+        Reviewed by Philippe Normand.
+
+        When parsing the challenge message, sometimes the message length
+        is 0 and parsing fails. This should not happen in principle and
+        that's why we just asserted on that but it looks like the
+        framework is not as careful as expected here. Hence we need to
+        bail out to not crash in release mode.
+
+        * platform/graphics/gstreamer/eme/CDMThunder.cpp:
+        (WebCore::CDMInstanceSessionThunder::challengeGeneratedCallback):
+
 2021-01-13  Sergio Villar Senin  <[email protected]>
 
         REGRESSION(r268666) Incorrect vertical position inside grid items with padding

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp (271436 => 271437)


--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp	2021-01-13 11:54:00 UTC (rev 271436)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp	2021-01-13 12:52:08 UTC (rev 271437)
@@ -360,7 +360,11 @@
 void CDMInstanceSessionThunder::challengeGeneratedCallback(RefPtr<SharedBuffer>&& buffer)
 {
     ParsedResponseMessage parsedResponseMessage(buffer);
-    ASSERT(parsedResponseMessage);
+    if (!parsedResponseMessage) {
+        GST_ERROR("response message parsing failed");
+        ASSERT_NOT_REACHED();
+        return;
+    }
 
     if (!m_challengeCallbacks.isEmpty()) {
         m_message = WTFMove(parsedResponseMessage.payload());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to