From a0ebbe5925f63d9a802c50bba8e9298cea21f1f7 Mon Sep 17 00:00:00 2001 From: jbj Date: Fri, 24 Aug 2001 17:55:08 +0000 Subject: [PATCH] - headers without RPMTAG_NAME are skipped when retrieved. CVS patchset: 5025 CVS date: 2001/08/24 17:55:08 --- CHANGES | 1 + rpmdb/rpmdb.c | 2 +- rpmio/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 561500d..c15294c 100644 --- a/CHANGES +++ b/CHANGES @@ -220,6 +220,7 @@ - python: add exception to detect bad data in hdrUnload. - change dir creation message from warning to debug for now. - verify perms (but not mode) on %ghost files. + - headers without RPMTAG_NAME are skipped when retrieved. 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 9171604..a38c58d 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -1982,7 +1982,7 @@ if (dbi->dbi_api == 1 && dbi->dbi_rpmtag == RPMDBI_PACKAGES && rc == EFAULT) { if (dbi->dbi_api == 1) uh = _free(uh); /* Did the header load correctly? */ - if (mi->mi_h == NULL) { + if (mi->mi_h == NULL || !headerIsEntry(mi->mi_h, RPMTAG_NAME)) { rpmError(RPMERR_BADHEADER, _("rpmdb: damaged header instance #%u retrieved, skipping.\n"), mi->mi_offset); diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index 2a31baa..fe98077 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign -EXTRA = tdigest.c tficl.c tkey.c trpmio.c +EXTRA_DIST = tdigest.c tficl.c tkey.c trpmio.c INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/build -I$(top_srcdir)/lib \ -I$(top_srcdir)/popt @INCPATH@ -- 2.7.4