[Rpm-maint] [rpm-software-management/rpm] Add Key Fingerprints to rpmsinfoMsg() (PR #3321)
Panu Matilainen
notifications at github.com
Tue Oct 1 11:40:08 UTC 2024
@pmatilai commented on this pull request.
> {
rpmPubkey *subkeys = NULL;
pgpDigParams *pgpsubkeys = NULL;
int pgpsubkeysCount = 0;
int i;
- if (mainkey && !pgpPrtParamsSubkeys(mainkey->pkt.data(), mainkey->pkt.size(),
- mainkey->pgpkey, &pgpsubkeys, &pgpsubkeysCount)) {
+ wrlock lock(primarykey->mutex);
+
+ if (primarykey && !pgpPrtParamsSubkeys(primarykey->pkt.data(), primarykey->pkt.size(),
Uff. There's a booby-trap in there that I'd totally missed: we're testing whether primarykey is NULL, but we already accessed primarykey->mutex in the above so the compiler might go optimize-happy doing who knows what. Sorry for missing this earlier, the whole rpmGetSubkeys() thing got tacked on the side of this PR when it looked like just a trivial thing but of course it wasn't *so* trivial afterall.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3321#pullrequestreview-2339951955
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3321/review/2339951955 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241001/f6487cb7/attachment.html>
More information about the Rpm-maint
mailing list