From d05ecc6253f6afbf9a5874a4b416670229ef0712 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Feb 26 2009 08:55:40 +0000 Subject: - 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 +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 - 4.6.0-10 +- handle NULL passed as EVR in rpmdsSingle() again (#485616) + * Wed Feb 25 2009 Panu Matilainen - 4.6.0-9 - pull out python byte-compile syntax check for now