[webkit-changes] [WebKit/WebKit] e57c45: Fix over-release in ClientConnection::hostAppCodeS...
Commit Queue
noreply at github.com
Thu Apr 13 11:26:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e57c4567984bf55aa097a768e4e4c9a20d00aa1a
https://github.com/WebKit/WebKit/commit/e57c4567984bf55aa097a768e4e4c9a20d00aa1a
Author: Luming Yin <luming_yin at apple.com>
Date: 2023-04-13 (Thu, 13 Apr 2023)
Changed paths:
M Source/WebKit/webpushd/PushClientConnection.mm
Log Message:
-----------
Fix over-release in ClientConnection::hostAppCodeSigningIdentifier
https://bugs.webkit.org/show_bug.cgi?id=255384
rdar://107974725
Reviewed by Simon Fraser.
In rdar://107931346, we introduced a change that wraps the value returned by CFArrayGetValueAtIndex()
using adoptCF. However, since CFArrayGetValueAtIndex() doesn’t return a retained object, our code will
cause an over-release. To resolve this issue, do not wrap the value returned by CFArrayGetValueAtIndex()
using adoptCF.
Additionally, the keys and values array were incorrectly swapped, causing the returned bundleIdentifier
to be loginwindow instead of the belonging app. Fix this by swapping keys and values so they are in the
correct order.
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::ClientConnection::bundleIdentifierFromAuditToken):
Swap keys and values so they are in the correct order, and do not wrap the value returned by
CFArrayGetValueAtIndex().
Canonical link: https://commits.webkit.org/262922@main
More information about the webkit-changes
mailing list