- avoid "can't happen" recursion while retrieving pubkeys.
authorjbj <devnull@localhost>
Thu, 19 Aug 2004 17:00:15 +0000 (17:00 +0000)
committerjbj <devnull@localhost>
Thu, 19 Aug 2004 17:00:15 +0000 (17:00 +0000)
CVS patchset: 7401
CVS date: 2004/08/19 17:00:15

CHANGES
lib/package.c

diff --git a/CHANGES b/CHANGES
index bbbf7ea..3cc008f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -22,6 +22,8 @@
        - xml: <integer/> instead of <integer>0</integer> markup.
        - fix: disable fingerprint generation on kernel paths.
        - add ppc8[25]60 arches.
+       - fix: evaluate rather than default file_contexts path. (#127501).
+       - avoid "can't happen" recursion while retrieving pubkeys.
 
 4.3 -> 4.3.1:
        - fix: don't add leading space to %* argv expansion (#119059).
index 273b6df..9dd5601 100644 (file)
@@ -350,7 +350,9 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
     rpmRC rc = RPMRC_FAIL;     /* assume failure */
     int xx;
     int i;
+    static int hclvl;
 
+    hclvl++;
 /*@-boundswrite@*/
     buf[0] = '\0';
 /*@=boundswrite@*/
@@ -489,6 +491,7 @@ exit:
        buf[sizeof(buf)-1] = '\0';
        if (msg) *msg = xstrdup(buf);
 /*@=boundswrite@*/
+       hclvl--;
        return rc;
     }
 
@@ -510,6 +513,7 @@ verifyinfo_exit:
        buf[sizeof(buf)-1] = '\0';
        if (msg) *msg = xstrdup(buf);
 /*@=boundswrite@*/
+       hclvl--;
        return rc;
     }
 
@@ -627,9 +631,12 @@ verifyinfo_exit:
     if (msg) *msg = xstrdup(buf);
 /*@=boundswrite@*/
 
+    /* XXX headerCheck can recurse, free info only at top level. */
+    if (hclvl == 1)
     rpmtsCleanDig(ts);
     if (info->tag == RPMTAG_SHA1HEADER)
        sig = _free(sig);
+    hclvl--;
     return rc;
 }