[webkit-changes] [WebKit/WebKit] 97c1b7: Regression(266049 at main) Crash in MIMETypeRegistry:...

Chris Dumez noreply at github.com
Fri Aug 11 17:00:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 97c1b7fd0b15d5a116620016f3714d271ed42a83
      https://github.com/WebKit/WebKit/commit/97c1b7fd0b15d5a116620016f3714d271ed42a83
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebCore/MIMETypeRegistry.cpp

  Log Message:
  -----------
  Regression(266049 at main) Crash in MIMETypeRegistry::preferredExtensionForMIMEType
https://bugs.webkit.org/show_bug.cgi?id=260098
rdar://113774128

Reviewed by Aditya Keerthi.

Make sure we early return if `type` is a null string to avoid doing a HashMap
lookup with it later on, which would cause crashes.

* Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::preferredExtensionForMIMEType):
* Tools/TestWebKitAPI/Tests/WebCore/MIMETypeRegistry.cpp:
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list