generic-poky/meta/recipes-devtools/rpm
Zhixiong Chi a21b0473ad 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.

workflow:
main()->rpmcliVerify()->rpmcliArgIter()->rpmQueryVerify()->rpmgiShowMatches()->showVerifyPackage()->
          rpmqv.c         verify.c        query.c             query.c           verify.c(headerIsEntry)
rpmVerifyScript()->rpmpsmScriptStage()->rpmpsmStage()->    rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
      verify.c            psm.c             psm.c                 psm.c

(From OE-Core rev: 91945b7fcb0c83ca72543e5327e965eca9c269c4)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:42 +01:00
..
rpm rpm: opendb before rpmverifyscript to avoid null point input 2015-08-19 18:05:42 +01:00
rpm-4.11.2 rpm: add version 4.11.2 2014-09-30 21:36:13 +01:00
rpmresolve rpmresolve: ignore null requires 2014-09-03 16:00:28 +01:00
rpm_4.11.2.bb rpm4: Drop native RDEPENDS 2015-07-23 08:48:37 +01:00
rpm_5.4+cvs.bb rpm: remove invalid sed command 2015-07-12 22:55:44 +01:00
rpm_5.4.14.bb rpm: opendb before rpmverifyscript to avoid null point input 2015-08-19 18:05:42 +01:00
rpmresolve_1.0.bb rpmresolve: Add nativesdk in BBCLASSEXTEND 2013-10-18 15:58:17 +01:00