- handle NULL passed as EVR in rpmdsSingle() again (#485616)
This commit is contained in:
parent
3bc5beb688
commit
d05ecc6253
30
rpm-4.6.0-rpmds-null.patch
Normal file
30
rpm-4.6.0-rpmds-null.patch
Normal file
@ -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;
|
||||||
|
}
|
7
rpm.spec
7
rpm.spec
@ -18,7 +18,7 @@
|
|||||||
Summary: The RPM package management system
|
Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.rpm.org/
|
Url: http://www.rpm.org/
|
||||||
Source0: http://rpm.org/releases/4.6.x/%{name}-%{srcver}.tar.bz2
|
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
|
Patch204: rpm-4.6.0-noarch-elf-check.patch
|
||||||
Patch205: rpm-4.6.0-pkgconfig-reqs.patch
|
Patch205: rpm-4.6.0-pkgconfig-reqs.patch
|
||||||
Patch206: rpm-4.6.0-python-validate.patch
|
Patch206: rpm-4.6.0-python-validate.patch
|
||||||
|
Patch207: rpm-4.6.0-rpmds-null.patch
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch300: rpm-4.6.0-extra-provides.patch
|
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
|
%patch204 -p1 -b .noarch-elf-check
|
||||||
%patch205 -p1 -b .pkgconfig-reqs
|
%patch205 -p1 -b .pkgconfig-reqs
|
||||||
#%patch206 -p1 -b .python-bytecompile
|
#%patch206 -p1 -b .python-bytecompile
|
||||||
|
%patch207 -p1 -b .rpmds-null
|
||||||
|
|
||||||
%patch300 -p1 -b .extra-prov
|
%patch300 -p1 -b .extra-prov
|
||||||
|
|
||||||
@ -385,6 +387,9 @@ exit 0
|
|||||||
%doc doc/librpm/html/*
|
%doc doc/librpm/html/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Feb 25 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-9
|
||||||
- pull out python byte-compile syntax check for now
|
- pull out python byte-compile syntax check for now
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user