From 261b4a2ecbc7b4ccef094490c74e90f8cfdacfff Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 13 Jul 2002 19:08:51 +0000 Subject: - install rpmal.h and rpmhash.h, implicit rpmps.hinclude, for now. - revert headerFree/headerLink/headerUnlink debugging. CVS patchset: 5550 CVS date: 2002/07/13 19:08:51 --- lib/rpmchecksig.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lib/rpmchecksig.c') diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 28e732059..b52b526e7 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -10,7 +10,6 @@ #include "rpmpgp.h" #include "rpmdb.h" -#include "rpmps.h" #define _RPMTS_INTERNAL #include "rpmts.h" @@ -140,7 +139,8 @@ exit: * @return 0 on success */ static int getSignid(Header sig, int sigtag, byte * signid) - /*@modifies *signid @*/ + /*@globals fileSystem @*/ + /*@modifies *signid, fileSystem @*/ { void * pkt = NULL; int_32 pkttyp = 0; @@ -151,7 +151,9 @@ static int getSignid(Header sig, int sigtag, byte * signid) struct pgpDig_s * dig = pgpNewDig(); if (!pgpPrtPkts(pkt, pktlen, dig, 0)) { +/*@-bounds@*/ memcpy(signid, dig->signature.signid, sizeof(dig->signature.signid)); +/*@=bounds@*/ rc = 0; } @@ -262,11 +264,11 @@ static int rpmReSign(/*@unused@*/ rpmts ts, xx = headerAddEntry(nh, tag, type, ptr, count); } hi = headerFreeIterator(hi); - oh = headerFree(oh, NULL); + oh = headerFree(oh); - sig = headerFree(sig, NULL); - sig = headerLink(nh, NULL); - nh = headerFree(nh, NULL); + sig = headerFree(sig); + sig = headerLink(nh); + nh = headerFree(nh); } /* Eliminate broken digest values. */ @@ -543,7 +545,7 @@ static int rpmImportPubkey(const rpmts ts, bottom: /* Clean up. */ - h = headerFree(h, "ImportPubkey"); + h = headerFree(h); dig = pgpFreeDig(dig); pkt = _free(pkt); n = _free(n); @@ -595,7 +597,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig) if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc) || uh == NULL) { - h = headerFree(h, NULL); + h = headerFree(h); rpmError(RPMERR_FREAD, _("%s: headerGetEntry failed\n"), fn); goto exit; } @@ -604,7 +606,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig) (void) rpmDigestUpdate(dig->hdrsha1ctx, uh, uhc); uh = headerFreeData(uh, uht); } - h = headerFree(h, NULL); + h = headerFree(h); } /* Read the payload from the package. */ -- cgit v1.2.3