Title: [277784] trunk/Source/WebCore
Revision
277784
Author
[email protected]
Date
2021-05-20 08:41:41 -0700 (Thu, 20 May 2021)

Log Message

CRASH: Null-pointer deref in MediaSessionManagerCocoa::setNowPlayingInfo()
https://bugs.webkit.org/show_bug.cgi?id=225999
<rdar://78232970>

Reviewed by Eric Carlson.

Null-check `nowPlayingInfo.artwork->imageData` before dereferencing.

* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (277783 => 277784)


--- trunk/Source/WebCore/ChangeLog	2021-05-20 15:33:12 UTC (rev 277783)
+++ trunk/Source/WebCore/ChangeLog	2021-05-20 15:41:41 UTC (rev 277784)
@@ -1,3 +1,16 @@
+2021-05-20  Jer Noble  <[email protected]>
+
+        CRASH: Null-pointer deref in MediaSessionManagerCocoa::setNowPlayingInfo()
+        https://bugs.webkit.org/show_bug.cgi?id=225999
+        <rdar://78232970>
+
+        Reviewed by Eric Carlson.
+
+        Null-check `nowPlayingInfo.artwork->imageData` before dereferencing.
+
+        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+        (WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):
+
 2021-05-20  Youenn Fablet  <[email protected]>
 
         <video> rendered inside <template> shows black for webcam stream (Safari 14.0.3 only)

Modified: trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm (277783 => 277784)


--- trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2021-05-20 15:33:12 UTC (rev 277783)
+++ trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2021-05-20 15:41:41 UTC (rev 277784)
@@ -318,7 +318,7 @@
         auto cfCurrentTime = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &nowPlayingInfo.currentTime));
         CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoElapsedTime, cfCurrentTime.get());
     }
-    if (nowPlayingInfo.artwork) {
+    if (nowPlayingInfo.artwork && nowPlayingInfo.artwork->imageData) {
         auto nsArtwork = nowPlayingInfo.artwork->imageData->createNSData();
         CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoArtworkData, nsArtwork.get());
         CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoArtworkMIMEType, nowPlayingInfo.artwork->mimeType.createCFString().get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to