rpm/rpm-5.4.9-fix-verify-segfault.patch
2012-05-18 05:02:54 +04:00

26 lines
788 B
Diff

--- rpm-5.4.9/rpmio/rpmhkp.c.fix_verify~ 2012-04-16 22:53:33.000000000 +0200
+++ rpm-5.4.9/rpmio/rpmhkp.c 2012-05-15 03:51:08.805023846 +0200
@@ -901,6 +901,14 @@ char * t, * te;
te = t = tbuf;
*te = '\0';
+ /*Reset all the temporary variables*/
+ hkp->pubx = -1;
+ hkp->uidx = -1;
+ hkp->subx = -1;
+ hkp->sigx = -1;
+ hkp->tvalid = 0;
+ hkp->uvalidx = -1;
+
HKPDEBUG((stderr, "--> %s(%p,%s)\n", __FUNCTION__, hkp, keyname));
/* Do a lazy lookup before validating. */
@@ -1065,7 +1073,7 @@ SPEW((stderr, "\t%s\n", pgpHexStr(hkp->p
}
exit:
- if ((hkp->uidx >= 0 && hkp->uidx < hkp->npkts) && hkp->tvalid > 0) {
+ if ((hkp->uvalidx >= 0 && hkp->uvalidx < hkp->npkts) && hkp->tvalid > 0) {
char user[256+1];
size_t nuser;
pgpPktUid * u;