RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Apr-2016 06:28:56 Branch: rpm-5_4 Handle: 2016040404285600 Modified files: (Branch: rpm-5_4) rpm/rpmdb header_internal.c Log: - header: remove the damaged tags assert failure. Summary: Revision Changes Path 1.20.2.2 +8 -2 rpm/rpmdb/header_internal.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmdb/header_internal.c ============================================================================ $ cvs diff -u -r1.20.2.1 -r1.20.2.2 header_internal.c --- rpm/rpmdb/header_internal.c 16 Apr 2012 23:43:34 -0000 1.20.2.1 +++ rpm/rpmdb/header_internal.c 4 Apr 2016 04:28:56 -0000 1.20.2.2 @@ -44,15 +44,21 @@ for (i = 0; i < il; i++) { info->tag = (rpmTag) ntohl(pe[i].tag); info->type = (rpmTagType) ntohl(pe[i].type); + info->offset = (rpmint32_t) ntohl(pe[i].offset); + info->count = (rpmuint32_t) ntohl(pe[i].count); +#if 0 +fprintf(stderr, "\ttag %d type %d offset 0x%x count %d\n", info->tag, info->type, info->offset, info->count); +#endif + /* XXX Convert RPMTAG_FILESTATE to RPM_UINT8_TYPE. */ if (info->tag == 1029 && info->type == 1) { info->type = RPM_UINT8_TYPE; } - info->offset = (rpmint32_t) ntohl(pe[i].offset); +#ifdef DYING assert(negate || info->offset >= 0); /* XXX insurance */ +#endif if (negate) info->offset = -info->offset; - info->count = (rpmuint32_t) ntohl(pe[i].count); if (hdrchkType(info->type)) return (int)i; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org