mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
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>
This commit is contained in:
parent
14c9af0056
commit
b3cb28df9f
35
meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch
Normal file
35
meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
Upstream-Status: Submitted
|
||||
|
||||
From: Qing He <qing.he@intel.com>
|
||||
Subject: [PATCH] rpm 5.4.0: Fix pointer mishandling
|
||||
|
||||
In fpLookupSubdir, data returned by hash should be of type
|
||||
"struct rpmffi_s **" instead of "struct rpmffi_s *" to avoid
|
||||
segfault.
|
||||
|
||||
Signed-off-by: Qing He <qing.he@intel.com>
|
||||
|
||||
diff --git a/rpmdb/fprint.c b/rpmdb/fprint.c
|
||||
index 0e76148..82b8f45 100644
|
||||
--- a/rpmdb/fprint.c
|
||||
+++ b/rpmdb/fprint.c
|
||||
@@ -333,7 +333,7 @@ restart:
|
||||
*te = '\0';
|
||||
|
||||
while (te < se) {
|
||||
- struct rpmffi_s * recs;
|
||||
+ struct rpmffi_s ** recs;
|
||||
int numRecs;
|
||||
int i;
|
||||
|
||||
@@ -346,8 +346,8 @@ restart:
|
||||
const char * link;
|
||||
int fx;
|
||||
|
||||
- fx = recs[i].fileno;
|
||||
- fi = recs[i].p->fi;
|
||||
+ fx = recs[i]->fileno;
|
||||
+ fi = recs[i]->p->fi;
|
||||
flink = fi->flinks[fx];
|
||||
if (!(flink && *flink != '\0'))
|
||||
continue;
|
||||
|
|
@ -43,7 +43,7 @@ LICENSE = "LGPL 2.1"
|
|||
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt"
|
||||
PR = "r15"
|
||||
PR = "r16"
|
||||
|
||||
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
|
||||
# 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
|
|||
file://rpm-nofsync.patch \
|
||||
file://rpm-solvedb.patch \
|
||||
file://rpm-tools-mtree-LDFLAGS.patch \
|
||||
file://fprint-pointer-fix.patch \
|
||||
"
|
||||
|
||||
# file://hdraddorappend.patch \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user