summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorZhixiong Chi <zhixiong.chi@windriver.com>2015-08-13 11:16:29 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:05:42 +0100
commita21b0473ad3f6e4d1de1284113f8dd02ef3a735f (patch)
treeedc3e92bf78988508be76ad29a56e464d12a8eba /README
parent7ed4a91863252c60e5c6c8997d6dac99b85854bc (diff)
downloadpoky-a21b0473ad3f6e4d1de1284113f8dd02ef3a735f.tar.gz
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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions