public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix hang-up on failed key import (related to #2149762)
Date: Mon, 23 Nov 2026 09:34:35 GMT	[thread overview]
Message-ID: <179542647543.1.9358547512667730913.rpms-rpm-6c83a290e331@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 6c83a290e3314c6fd94a41f9e1748ccbacba68a0
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2022-12-07T13:52:01+02:00
Stats  : +36/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/6c83a290e3314c6fd94a41f9e1748ccbacba68a0?branch=pmatilai-v6

Log:
Fix hang-up on failed key import (related to #2149762)

---
diff --git a/0001-Fix-potential-uninitialized-variable-use-in-rpmtsImp.patch b/0001-Fix-potential-uninitialized-variable-use-in-rpmtsImp.patch
new file mode 100644
index 0000000..c2b2341
--- /dev/null
+++ b/0001-Fix-potential-uninitialized-variable-use-in-rpmtsImp.patch
@@ -0,0 +1,31 @@
+From a3d11f7a53811e42cbe36a91a1583a723c2fe108 Mon Sep 17 00:00:00 2001
+Message-Id: <a3d11f7a53811e42cbe36a91a1583a723c2fe108.1670413818.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Mon, 6 Jun 2022 12:04:15 +0300
+Subject: [PATCH] Fix potential uninitialized variable use in
+ rpmtsImportPubkey()
+
+Commit d703160334ff545ce8bf7475da5689422f43dacc introduced a new step
+to key import which can fail before keyring is initialized.
+
+Always initialize your variables, never need "fixes" like this.
+---
+ lib/rpmts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmts.c b/lib/rpmts.c
+index 0b6b7ac6b..b1c80b9c8 100644
+--- a/lib/rpmts.c
++++ b/lib/rpmts.c
+@@ -609,7 +609,7 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen
+     rpmPubkey *subkeys = NULL;
+     int subkeysCount = 0;
+     rpmVSFlags oflags = rpmtsVSFlags(ts);
+-    rpmKeyring keyring;
++    rpmKeyring keyring = NULL;
+     rpmtxn txn = rpmtxnBegin(ts, RPMTXN_WRITE);
+     int krc, i;
+ 
+-- 
+2.38.1
+

diff --git a/rpm.spec b/rpm.spec
index 24f98da..e0eda0d 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -32,7 +32,7 @@
 
 %global rpmver 4.18.0
 #global snapver rc1
-%global baserelease 7
+%global baserelease 8
 %global sover 9
 
 %global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -135,6 +135,7 @@ rpm-4.9.90-no-man-dirs.patch
 
 # Patches already upstream:
 # ...
+0001-Fix-potential-uninitialized-variable-use-in-rpmtsImp.patch
 
 # These are not yet upstream
 rpm-4.7.1-geode-i686.patch
@@ -623,6 +624,9 @@ fi
 %doc docs/librpm/html/*
 
 %changelog
+* Wed Dec 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-8
+- Fix hang-up on failed key import (related to #2149762)
+
 * Thu Nov 24 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-7
 - Require rpm-sequoia >= 1.2.0 for V3 signature support, re-enable (#2141686)
 

                 reply	other threads:[~2026-11-23  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542647543.1.9358547512667730913.rpms-rpm-6c83a290e331@fedoraproject.org \
    --to=pmatilai@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox