summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-05-27 09:03:18 (GMT)
committerSaul Wold <sgw@linux.intel.com>2011-05-27 17:48:28 (GMT)
commitdd7e260fe374e337a385d1cb8951cb3de8a2c741 (patch)
tree1f6819f7b854340e750a910a7b0a6317a4789afe
parent5f76f3b18d5fbd6bb25ebd40ed4e4426764133e7 (diff)
downloadpoky-dd7e260fe374e337a385d1cb8951cb3de8a2c741.tar.gz
rpm: fix fprint pointer issue
[YOCTO #1030] (From OE-Core rev: bc4b86639a713c877dbe5e0f984873915d1578d4) Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch35
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb3
2 files changed, 37 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch b/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch
new file mode 100644
index 0000000..87a92eb
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch
@@ -0,0 +1,35 @@
1Upstream-Status: Submitted
2
3From: Qing He <qing.he@intel.com>
4Subject: [PATCH] rpm 5.4.0: Fix pointer mishandling
5
6In fpLookupSubdir, data returned by hash should be of type
7"struct rpmffi_s **" instead of "struct rpmffi_s *" to avoid
8segfault.
9
10Signed-off-by: Qing He <qing.he@intel.com>
11
12diff --git a/rpmdb/fprint.c b/rpmdb/fprint.c
13index 0e76148..82b8f45 100644
14--- a/rpmdb/fprint.c
15+++ b/rpmdb/fprint.c
16@@ -333,7 +333,7 @@ restart:
17 *te = '\0';
18
19 while (te < se) {
20- struct rpmffi_s * recs;
21+ struct rpmffi_s ** recs;
22 int numRecs;
23 int i;
24
25@@ -346,8 +346,8 @@ restart:
26 const char * link;
27 int fx;
28
29- fx = recs[i].fileno;
30- fi = recs[i].p->fi;
31+ fx = recs[i]->fileno;
32+ fi = recs[i]->p->fi;
33 flink = fi->flinks[fx];
34 if (!(flink && *flink != '\0'))
35 continue;
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index ff55469..d3f85f2 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPL 2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt" 45DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt"
46PR = "r15" 46PR = "r16"
47 47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract... 49# in order to extract the distribution SRPM into a format we can extract...
@@ -57,6 +57,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
57 file://rpm-nofsync.patch \ 57 file://rpm-nofsync.patch \
58 file://rpm-solvedb.patch \ 58 file://rpm-solvedb.patch \
59 file://rpm-tools-mtree-LDFLAGS.patch \ 59 file://rpm-tools-mtree-LDFLAGS.patch \
60 file://fprint-pointer-fix.patch \
60 " 61 "
61 62
62# file://hdraddorappend.patch \ 63# file://hdraddorappend.patch \