public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - handle NULL passed as EVR in rpmdsSingle() again (#485616)
Date: Mon, 23 Nov 2026 09:25:40 GMT	[thread overview]
Message-ID: <179542594061.1.5544508755875760079.rpms-rpm-d05ecc6253f6@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : d05ecc6253f6afbf9a5874a4b416670229ef0712
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2009-02-26T08:55:40+00:00
Stats  : +36/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/d05ecc6253f6afbf9a5874a4b416670229ef0712?branch=pmatilai-v6

Log:
- handle NULL passed as EVR in rpmdsSingle() again (#485616)

---
diff --git a/rpm-4.6.0-rpmds-null.patch b/rpm-4.6.0-rpmds-null.patch
new file mode 100644
index 0000000..239405d
--- /dev/null
+++ b/rpm-4.6.0-rpmds-null.patch
@@ -0,0 +1,30 @@
+commit 3448b552964a526641d2e85b4ed27ebe3465f100
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Thu Feb 26 10:49:38 2009 +0200
+
+    Handle empty argv passed to rpmdsDupArgv()
+    - same as 94552b96256c3620b4be407c501d0d926c081963, apt-rpm expects to
+      pass empty version as NULL to rpmdsSingle()
+
+diff --git a/lib/rpmds.c b/lib/rpmds.c
+index 02b539c..bc829f4 100644
+--- a/lib/rpmds.c
++++ b/lib/rpmds.c
+@@ -508,15 +508,14 @@ const char ** rpmdsDupArgv(const char ** argv, int argc)
+ 
+     if (argv == NULL)
+ 	return NULL;
+-    for (ac = 0; ac < argc; ac++) {
+-assert(argv[ac] != NULL);
++    for (ac = 0; ac < argc && argv[ac]; ac++) {
+ 	nb += strlen(argv[ac]) + 1;
+     }
+     nb += (ac + 1) * sizeof(*av);
+ 
+     av = xmalloc(nb);
+     t = (char *) (av + ac + 1);
+-    for (ac = 0; ac < argc; ac++) {
++    for (ac = 0; ac < argc && argv[ac]; ac++) {
+ 	av[ac] = t;
+ 	t = stpcpy(t, argv[ac]) + 1;
+     }

diff --git a/rpm.spec b/rpm.spec
index 9012948..807c328 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -18,7 +18,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 9%{?dist}
+Release: 10%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/4.6.x/%{name}-%{srcver}.tar.bz2
@@ -43,6 +43,7 @@ Patch203: rpm-4.6.0-utf-dependencies.patch
 Patch204: rpm-4.6.0-noarch-elf-check.patch
 Patch205: rpm-4.6.0-pkgconfig-reqs.patch
 Patch206: rpm-4.6.0-python-validate.patch
+Patch207: rpm-4.6.0-rpmds-null.patch
 
 # These are not yet upstream
 Patch300: rpm-4.6.0-extra-provides.patch
@@ -184,6 +185,7 @@ that will manipulate RPM packages and databases.
 %patch204 -p1 -b .noarch-elf-check
 %patch205 -p1 -b .pkgconfig-reqs
 #%patch206 -p1 -b .python-bytecompile
+%patch207 -p1 -b .rpmds-null
 
 %patch300 -p1 -b .extra-prov
 
@@ -385,6 +387,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Feb 26 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-10
+- handle NULL passed as EVR in rpmdsSingle() again (#485616)
+
 * Wed Feb 25 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-9
 - pull out python byte-compile syntax check for now
 

                 reply	other threads:[~2026-11-23  9:25 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=179542594061.1.5544508755875760079.rpms-rpm-d05ecc6253f6@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --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