Hello community, here is the log from the commit of package libzio for openSUSE:Factory checked in at 2017-07-10 10:59:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzio (Old) and /work/SRC/openSUSE:Factory/.libzio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzio" Mon Jul 10 10:59:38 2017 rev:41 rq:507070 version:1.05 Changes: -------- --- /work/SRC/openSUSE:Factory/libzio/libzio.changes 2017-03-09 01:33:19.502727491 +0100 +++ /work/SRC/openSUSE:Factory/.libzio.new/libzio.changes 2017-07-10 10:59:40.233657767 +0200 @@ -1,0 +2,9 @@ +Thu Jun 29 11:53:07 UTC 2017 - [email protected] + +- Push to version 1.05 + * Avoid that writer of fopencookie(3) will return less than + the initial buffer size. + * Make sure that MIN macro is defined if used. + * Some minor changes as well. + +------------------------------------------------------------------- Old: ---- libzio-1.04.tar.bz2 New: ---- libzio-1.05.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzio.spec ++++++ --- /var/tmp/diff_new_pack.nzBZrJ/_old 2017-07-10 10:59:40.865568581 +0200 +++ /var/tmp/diff_new_pack.nzBZrJ/_new 2017-07-10 10:59:40.865568581 +0200 @@ -18,7 +18,7 @@ Name: libzio %define lname libzio1 -Version: 1.04 +Version: 1.05 Release: 0 Summary: A Library for Accessing Compressed Text Files License: GPL-2.0+ ++++++ libzio-1.04.tar.bz2 -> libzio-1.05.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.04/Makefile new/libzio-1.05/Makefile --- old/libzio-1.04/Makefile 2017-02-28 11:03:13.815020847 +0100 +++ new/libzio-1.05/Makefile 2017-06-29 13:18:53.927138624 +0200 @@ -8,7 +8,7 @@ CFLAGS = $(RPM_OPT_FLAGS) -pipe -Wall -D_GNU_SOURCE -D_REENTRANT -D_DEFAULT_SOURCE $(LARGE) CC = gcc MAJOR = 1 -MINOR = 04 +MINOR = 05 VERSION = $(MAJOR).$(MINOR) SONAME = libzio.so.$(MAJOR) LDMAP = -Wl,--version-script=zio.map diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.04/zio.c new/libzio-1.05/zio.c --- old/libzio-1.04/zio.c 2013-02-27 11:40:59.797944802 +0100 +++ new/libzio-1.05/zio.c 2017-06-29 13:27:32.573662844 +0200 @@ -5,6 +5,7 @@ * Copyright 2006 Werner Fink, 2006 SuSE Products GmbH, Germany. * Copyright 2009 Werner Fink, 2009 SuSE Products GmbH, Germany. * Copyright 2013 Werner Fink, 2013 SuSE Products GmbH, Germany. + * Copyright 2017 Werner Fink, 2017 SUSE Linux GmbH, Germany. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +52,7 @@ errno = EINVAL; return -1; } - off_t offset = (off_t)*poffset; + off_t offset __attribute__ ((__unused__)) = (off_t)*poffset; return (zio_int_t)gzseek((gzFile)cookie, (z_off_t)(*poffset), whence); } @@ -89,6 +90,7 @@ FILE *stdio; char *mode; char *path; + int level; int fd; } bzfile_t; @@ -118,6 +120,8 @@ len = (ssize_t)BZ2_bzwrite(bzf->file, (void*)buf, count); if (len > 0) bzf->position += len; + if (len > 0 && len < count) + len = count; out: if (len < 0) errno = EINVAL; @@ -335,8 +339,11 @@ len = sizeof(lzma->buf) - strm->avail_out; if (len && fwrite(lzma->buf, 1, len, lzma->file) != len) break; - if (strm->avail_in == 0) + if (strm->avail_in == 0) { + if (len > 0 && len < count) + len = count; return len; + } } return -1; } @@ -512,6 +519,10 @@ # endif /* !HAS_LZMADEC_H */ #endif /* !HAS_LZMA_H */ +#ifndef MIN +# define MIN(x,y) ((x) < (y) ? (x) : (y)) +#endif + typedef struct lzwfile_s { size_t position; LZW_t *file; @@ -867,6 +878,7 @@ goto out; memset(cookie, 0, alignof(bzfile_t)+strsize(ext)+strsize(mode)); + n = strlen(mode); for (i = 1; i < n; i++) { if (mode[i] >= '0' && mode[i] <= '9') { level = (int)mode[i]; @@ -877,6 +889,7 @@ cookie->fd = -1; cookie->mode = ((char*)cookie)+alignof(bzfile_t); cookie->path = cookie->mode+strsize(mode); + cookie->level = level; strcpy(cookie->mode, mode); strcpy(cookie->path, ext); @@ -1132,6 +1145,7 @@ goto out; memset(cookie, 0, alignof(bzfile_t)+strsize(mode)); + n = strlen(mode); for (i = 1; i < n; i++) { if (mode[i] >= '0' && mode[i] <= '9') { level = (int)mode[i]; @@ -1141,6 +1155,7 @@ cookie->fd = fildes; cookie->mode = ((char*)cookie)+alignof(bzfile_t); + cookie->level = level; strcpy(cookie->mode, mode); if (cookie->mode == (char*)0) {
