Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 249e0d35858bb3350772a6edbd873bacb4fd255d
https://github.com/WebKit/WebKit/commit/249e0d35858bb3350772a6edbd873bacb4fd255d
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M Source/WebKit/Shared/Extensions/WebExtensionLocalization.cpp
Log Message:
-----------
Potential null dereference in
`WebExtensionLocalization::stringByReplacingNamedPlaceholdersInString`
https://bugs.webkit.org/show_bug.cgi?id=317342
rdar://179965765
Reviewed by Timothy Hatcher.
The placeholders argument (RefPtr<JSON::Object>) is null whenever the localized
message has no
"placeholders" key: localizedStringForKey passes
jsonWithLowercaseKeys(stringJSON->getObject(placeholdersKey)), and
jsonWithLowercaseKeys returns
null when given null. The function still enters its match loop whenever the
message text contains
a $NAME$ token, and then called placeholders->getObject(key) with no null guard.
* Source/WebKit/Shared/Extensions/WebExtensionLocalization.cpp:
(WebKit::WebExtensionLocalization::stringByReplacingNamedPlaceholdersInString):
Canonical link: https://commits.webkit.org/315443@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications