Title: [271261] trunk/Source/WebCore
Revision
271261
Author
[email protected]
Date
2021-01-07 14:40:14 -0800 (Thu, 07 Jan 2021)

Log Message

[MSE] Fix potential crash in SourceBufferPrivateAVFObjC::destroyParser
https://bugs.webkit.org/show_bug.cgi?id=220434

Reviewed by Jer Noble.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyParser): NULL-check
m_mediaSource->player() before using it.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271260 => 271261)


--- trunk/Source/WebCore/ChangeLog	2021-01-07 22:30:26 UTC (rev 271260)
+++ trunk/Source/WebCore/ChangeLog	2021-01-07 22:40:14 UTC (rev 271261)
@@ -1,3 +1,14 @@
+2021-01-07  Eric Carlson  <[email protected]>
+
+        [MSE] Fix potential crash in SourceBufferPrivateAVFObjC::destroyParser
+        https://bugs.webkit.org/show_bug.cgi?id=220434
+
+        Reviewed by Jer Noble.
+
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        (WebCore::SourceBufferPrivateAVFObjC::destroyParser): NULL-check 
+        m_mediaSource->player() before using it.
+
 2021-01-07  Fujii Hironori  <[email protected]>
 
         [WinCairo] WebGL isn't shown in non-AC mode

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (271260 => 271261)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm	2021-01-07 22:30:26 UTC (rev 271260)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm	2021-01-07 22:40:14 UTC (rev 271261)
@@ -624,7 +624,7 @@
     if (!parser)
         return;
 #if HAVE(AVSTREAMSESSION) && ENABLE(LEGACY_ENCRYPTED_MEDIA)
-    if (m_mediaSource && m_mediaSource->player()->hasStreamSession())
+    if (m_mediaSource && m_mediaSource->player() && m_mediaSource->player()->hasStreamSession())
         [m_mediaSource->player()->streamSession() removeStreamDataParser:parser];
 #endif
 #if ENABLE(ENCRYPTED_MEDIA) && HAVE(AVCONTENTKEYSESSION)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to