summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
Commit message (Collapse)AuthorAgeFilesLines
* rpm: A number of the patches have been submitted upstreamMark Hatle2016-03-091-1/+1
| | | | | | | | | Note the upstream submission in the patches. (From OE-Core rev: 9672f7620a365d29afca81d357d1d4d5fcedb3ed) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: opendb before rpmverifyscript to avoid null point inputZhixiong Chi2015-08-191-0/+24
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>