Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a19c53e12f2d6e87fe835555a6e9cb0cbd77ced0
https://github.com/WebKit/WebKit/commit/a19c53e12f2d6e87fe835555a6e9cb0cbd77ced0
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-02 (Wed, 02 Sep 2026)
Changed paths:
M Source/WebCore/loader/PrivateClickMeasurement.cpp
Log Message:
-----------
PrivateClickMeasurement path constants should be ASCIILiteral to avoid
unsafeSpan
https://bugs.webkit.org/show_bug.cgi?id=323243
rdar://186495899
Reviewed by Chris Dumez.
The token-signature, token-public-key, and report-attribution path
constants were declared as `static const char[]`, while their siblings
(trigger-attribution and the SKAdNetwork prefix) already use ASCIILiteral
(_s). Passing the C-string constants to makeValidURL() forced it to take a
`const char*` and wrap the argument in unsafeSpan(), a runtime scan flagged
as an unsafe buffer access.
Declare the three constants as `constexpr auto ... = "..."_s` and change
makeValidURL() to take an ASCIILiteral, passing it straight to makeString().
This drops the unsafeSpan() call and the runtime length computation with no
behavior change.
* Source/WebCore/loader/PrivateClickMeasurement.cpp:
(WebCore::makeValidURL):
Canonical link: https://commits.webkit.org/320387@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications