Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6b81371ea4fff5028d15145fb9065e1011319d63
https://github.com/WebKit/WebKit/commit/6b81371ea4fff5028d15145fb9065e1011319d63
Author: Charlie Wolfe <[email protected]>
Date: 2026-02-23 (Mon, 23 Feb 2026)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm
Log Message:
-----------
WebContent process termination caused by invalid
`NetworkConnectionToWebProcess_LoadImageForDecoding` message
https://bugs.webkit.org/show_bug.cgi?id=308509
rdar://171028333
Reviewed by Aditya Keerthi.
A client can call _loadAndDecodeImage: with an NSURLRequest whose URL is
invalid. The invalid URL
survives IPC serialization and reaches
NetworkConnectionToWebProcess::loadImageForDecoding, where
a MESSAGE_CHECK on url.isValid() fails and terminates the web process.
Check url.isValid() in WebPageProxy::loadAndDecodeImage and return a
decodeError early, preventing
the invalid URL from being sent to the WCP.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAndDecodeImage):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm:
(TestWebKitAPI::TEST(WebKit, LoadAndDecodeImageInvalidURL)):
Canonical link: https://commits.webkit.org/308105@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications