Files
poky/meta/recipes-devtools
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
..
2015-08-11 09:28:51 -07:00
2015-08-11 09:28:51 -07:00
2015-08-19 18:05:40 +01:00
2015-04-30 23:04:16 +01:00
2015-08-11 09:28:48 -07:00
2015-07-20 10:40:41 +01:00
2015-04-21 07:20:23 +01:00
2015-08-11 09:28:50 -07:00
2014-03-02 17:25:28 +00:00
2015-06-27 22:42:52 +01:00
2015-07-25 14:41:43 +01:00
2015-08-10 12:40:31 -07:00
2015-08-10 12:40:20 -07:00
2015-08-10 12:40:20 -07:00
2015-07-12 22:55:42 +01:00
2015-04-21 07:20:25 +01:00
2014-12-23 10:18:20 +00:00
2015-01-16 23:08:24 +00:00
2015-08-16 22:40:56 +01:00
2015-05-30 22:26:12 +01:00
2015-04-21 07:20:25 +01:00
2014-08-28 15:12:42 +01:00
2015-07-31 10:32:44 +01:00
2015-08-19 18:05:32 +01:00
2015-08-16 22:40:55 +01:00
2014-08-11 10:53:05 +01:00
2015-06-08 17:34:03 +01:00
2015-04-21 07:20:25 +01:00
2015-05-20 21:41:08 +01:00
2015-06-11 23:59:15 +01:00