[webkit-changes] [WebKit/WebKit] dd2532: CRASH: Exception thrown from -[AVAssetResourceLoad...

Jer Noble noreply at github.com
Fri Jan 5 16:59:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd25322e371157212c618ce09a76040ddc25862a
      https://github.com/WebKit/WebKit/commit/dd25322e371157212c618ce09a76040ddc25862a
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm

  Log Message:
  -----------
  CRASH: Exception thrown from -[AVAssetResourceLoadingRequest finishLoading]
https://bugs.webkit.org/show_bug.cgi?id=267153
rdar://118422805

Reviewed by Andy Estes.

AVAssetResourceLoadingRequest will throw an undocumented exception when -finishLoading is called,
provided a `contentType` present in the request, the `allowedContentTypes` readonly property is
non-nil, non-empty, and `contentType` is not present in the `allowedContentTypes` array.

`allowedContentTypes` is almost always nil, except under certain senarios involving AirPlay.

Protect against this undocument execption by wrapping -finishLoading in a try/catch block.

* Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::responseReceived):
(WebCore::WebCoreAVFResourceLoader::loadFinished):
(WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer):

Canonical link: https://commits.webkit.org/272715@main




More information about the webkit-changes mailing list