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-Mar-2017 20:13:59 Branch: rpm-5_4 Handle: 2017030419135900 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmdb header.c Log: - header: fix: test args before immutable region trailer memcpy (PLD). Summary: Revision Changes Path 1.3501.2.523+1 -0 rpm/CHANGES 1.198.2.26 +4 -3 rpm/rpmdb/header.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.522 -r1.3501.2.523 CHANGES --- rpm/CHANGES 2 Mar 2017 18:36:44 -0000 1.3501.2.522 +++ rpm/CHANGES 4 Mar 2017 19:13:59 -0000 1.3501.2.523 @@ -1,4 +1,5 @@ 5.4.17 -> 5.4.18: + - jbj: header: fix: test args before immutable region trailer memcpy (PLD). - jbj: fix: filter EEXIST and use rpmlog on tmpdir creation (ticket #97). - jbj: flatcc: AutoFU added. - jbj: mongoc: disable openssl if 1.1.0. @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/header.c ============================================================================ $ cvs diff -u -r1.198.2.25 -r1.198.2.26 header.c --- rpm/rpmdb/header.c 19 Apr 2016 13:23:02 -0000 1.198.2.25 +++ rpm/rpmdb/header.c 4 Mar 2017 19:13:59 -0000 1.198.2.26 @@ -998,12 +998,13 @@ if (off < 0) goto errxit; if (off) { + rpmuint32_t * stei; size_t nb = REGION_TAG_COUNT; - /* XXX copy to fix alignment problems */ - rpmuint32_t * stei = (rpmuint32_t *) - memcpy(alloca(nb), dataStart + off, nb); if ((off + nb) > dl) goto errxit; + /* XXX copy to fix alignment problems */ + stei = (rpmuint32_t *) + memcpy(alloca(nb), dataStart + off, nb); rdl = (rpmuint32_t)-ntohl(stei[2]); /* negative offset */ if (rdl < REGION_TAG_COUNT || rdl > (rpmuint32_t)(off+nb)) goto errxit; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org