public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - handle NULL passed as EVR in rpmdsSingle() again (#485616)
@ 2026-11-23  9:25 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:25 UTC (permalink / raw)
  To: git-commits

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
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:25 [rpms/rpm] pmatilai-v6: - handle NULL passed as EVR in rpmdsSingle() again (#485616) Panu Matilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox