diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch new file mode 100644 index 000000000..e2191245f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch @@ -0,0 +1,24 @@ +rpm: opendb before rpmverifyscript to avoid null point input + +If the command is "rpm -V" and the return value of (headerIsEntry(h, RPMTAG_VERIFYSCRIPT) +|| headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, it will call +rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur segment +fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn). +So we open rpmdb to avoid bad input when find headerIsEntry true. + +Upstream-Status: Submitted [RPM5 maintainer] + +Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> +Index: rpm-5.4.14/lib/verify.c +=================================================================== +--- rpm-5.4.14.orig/lib/verify.c 2015-07-22 22:09:59.992895355 +0800 ++++ rpm-5.4.14/lib/verify.c 2015-08-13 10:20:33.752177906 +0800 +@@ -613,6 +613,8 @@ + { + FD_t fdo = fdDup(STDOUT_FILENO); + ++ rpmtsOpenDB(ts, O_RDONLY); /*Open the DB to avoid null point input in function rpmpsmStage()*/ ++ + rc = rpmfiSetHeader(fi, h); + if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0) + ec += rc; |