diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | lib/misc.c | 6 | ||||
-rw-r--r-- | rpm.spec.in | 1 | ||||
-rw-r--r-- | rpmio/rpmio.c | 4 | ||||
-rw-r--r-- | zlib/infblock.c | 11 |
5 files changed, 16 insertions, 7 deletions
@@ -123,6 +123,7 @@ - generate index for hdrid (aka Sha1header) tag, query/verify by hdrid. - generate index for fileid (aka Filemd5s) tag, query/verify by fileid. - query/verify by install transaction id. + - rpm-4.0.4 release candidate. 4.0.2 -> 4.0.3: - update per-interpreter dependency scripts, add sql/tcl (#20295). diff --git a/lib/misc.c b/lib/misc.c index ad61d1b0b..cc0832e99 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -7,6 +7,9 @@ /*@unchecked@*/ static int _debug = 0; +/* just to put a marker in librpm.a */ +const char * RPMVERSION = VERSION; + #include "rpmio_internal.h" #include <rpmurl.h> #include <rpmmacro.h> /* XXX for rpmGetPath */ @@ -18,9 +21,6 @@ static int _debug = 0; /*@access Header@*/ /* XXX compared with NULL */ /*@access FD_t@*/ /* XXX compared with NULL */ -/* just to put a marker in librpm.a */ -const char * RPMVERSION = VERSION; - char ** splitString(const char * str, int length, char sep) { const char * source; diff --git a/rpm.spec.in b/rpm.spec.in index 8dc790b3b..dbc9ec6f2 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -641,3 +641,4 @@ fi - generate index for hdrid (aka Sha1header) tag, query/verify by hdrid. - generate index for fileid (aka Filemd5s) tag, query/verify by fileid. - query/verify by install transaction id. +- rpm-4.0.4 release candidate. diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 0c4a90d64..c39dfdc9c 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -487,6 +487,10 @@ DBGIO(fd, (stderr, "==>\tfdClose(%p) rc %lx %s\n", (fd ? fd : NULL), (unsigned l fdno = open(path, flags, mode); if (fdno < 0) return NULL; + if (fcntl(fdno, F_SETFD, FD_CLOEXEC)) { + (void) close(fdno); + return NULL; + } fd = fdNew("open (fdOpen)"); fdSetFdno(fd, fdno); fd->flags = flags; diff --git a/zlib/infblock.c b/zlib/infblock.c index 6584a67a1..63bb78739 100644 --- a/zlib/infblock.c +++ b/zlib/infblock.c @@ -251,10 +251,11 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r) &s->sub.trees.tb, s->hufts, z); if (t != Z_OK) { - ZFREE(z, s->sub.trees.blens); r = t; - if (r == Z_DATA_ERROR) + if (r == Z_DATA_ERROR) { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } goto leave; } s->sub.trees.index = 0; @@ -316,14 +317,16 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r) t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), s->sub.trees.blens, &bl, &bd, &tl, &td, s->hufts, z); - ZFREE(z, s->sub.trees.blens); if (t != Z_OK) { - if (t == (uInt)Z_DATA_ERROR) + if (t == (uInt)Z_DATA_ERROR) { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } r = t; goto leave; } + ZFREE(z, s->sub.trees.blens); Tracev((stderr, "inflate: trees ok\n")); if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) { |