Hello community,

here is the log from the commit of package zlib for openSUSE:Factory checked in 
at 2020-08-17 11:58:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zlib (Old)
 and      /work/SRC/openSUSE:Factory/.zlib.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zlib"

Mon Aug 17 11:58:55 2020 rev:77 rq:824669 version:1.2.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/zlib/zlib.changes        2020-04-27 
23:28:01.594310891 +0200
+++ /work/SRC/openSUSE:Factory/.zlib.new.3399/zlib.changes      2020-08-17 
11:59:19.166491605 +0200
@@ -1,0 +2,8 @@
+Thu Aug  6 08:36:48 UTC 2020 - Lidong Zhong <lidong.zh...@suse.com>
+
+- Permit a deflateParams() parameter change as soon as possible(bsc#1174736)
+    * bsc1174736-DFLTCC_LEVEL_MASK-set-to-0x1ff.patch
+  Fix DFLTCC not flushing EOBS when creating raw streams(bsc#1174551)
+    * bsc1174551-fxi-imcomplete-raw-streams.patch
+
+-------------------------------------------------------------------

New:
----
  bsc1174551-fxi-imcomplete-raw-streams.patch
  bsc1174736-DFLTCC_LEVEL_MASK-set-to-0x1ff.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zlib.spec ++++++
--- /var/tmp/diff_new_pack.aCqRgK/_old  2020-08-17 11:59:23.522494033 +0200
+++ /var/tmp/diff_new_pack.aCqRgK/_new  2020-08-17 11:59:23.526494034 +0200
@@ -41,6 +41,8 @@
 #PATCH-FIX-SUSE do not check exact version match as the lib can be updated
 #               we should simply rely on soname versioning to protect us
 Patch5:         zlib-no-version-check.patch
+Patch6:         bsc1174736-DFLTCC_LEVEL_MASK-set-to-0x1ff.patch
+Patch7:         bsc1174551-fxi-imcomplete-raw-streams.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libtool
@@ -122,6 +124,8 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 cp %{SOURCE4} .
 
 %build

++++++ bsc1174551-fxi-imcomplete-raw-streams.patch ++++++
diff --git a/deflate.c b/deflate.c
index 3c302bc..1ab1635 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1110,7 +1110,6 @@ int ZEXPORT deflate (strm, flush)
     }
 
     if (flush != Z_FINISH) return Z_OK;
-    if (s->wrap <= 0) return Z_STREAM_END;
 
     /* Write the trailer */
 #ifdef GZIP
@@ -1126,7 +1125,7 @@ int ZEXPORT deflate (strm, flush)
     }
     else
 #endif
-    {
+    if (s->wrap == 1) {
         putShortMSB(s, (uInt)(strm->adler >> 16));
         putShortMSB(s, (uInt)(strm->adler & 0xffff));
     }
@@ -1135,7 +1134,11 @@ int ZEXPORT deflate (strm, flush)
      * to flush the rest.
      */
     if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
+    if (s->pending == 0) {
+        Assert(s->bi_valid == 0, "bi_buf not flushed");
+        return Z_STREAM_END;
+    }
+    return Z_OK;
 }
 
 /* ========================================================================= */
++++++ bsc1174736-DFLTCC_LEVEL_MASK-set-to-0x1ff.patch ++++++
Index: zlib-1.2.11/deflate.c
===================================================================
--- zlib-1.2.11.orig/deflate.c
+++ zlib-1.2.11/deflate.c
@@ -504,7 +504,7 @@ int ZEXPORT deflateResetKeep (strm)
         s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
 #endif
         adler32(0L, Z_NULL, 0);
-    s->last_flush = Z_NO_FLUSH;
+    s->last_flush = -2;
 
     _tr_init(s);
 
@@ -601,13 +601,13 @@ int ZEXPORT deflateParams(strm, level, s
     func = configuration_table[s->level].func;
 
     if ((strategy != s->strategy || func != configuration_table[level].func ||
-         hook_flush != Z_NO_FLUSH) && s->high_water) {
+         hook_flush != Z_NO_FLUSH) && s->last_flush != -2) {
         /* Flush the last buffer: */
         int err = deflate(strm, RANK(hook_flush) > RANK(Z_BLOCK) ?
                           hook_flush : Z_BLOCK);
         if (err == Z_STREAM_ERROR)
             return err;
-        if (strm->avail_out == 0)
+        if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
             return Z_BUF_ERROR;
     }
     if (s->level != level) {
Index: zlib-1.2.11/zlib.h
===================================================================
--- zlib-1.2.11.orig/zlib.h
+++ zlib-1.2.11/zlib.h
@@ -712,11 +712,12 @@ ZEXTERN int ZEXPORT deflateParams OF((z_
    used to switch between compression and straight copy of the input data, or
    to switch to a different kind of input data requiring a different strategy.
    If the compression approach (which is a function of the level) or the
-   strategy is changed, and if any input has been consumed in a previous
-   deflate() call, then the input available so far is compressed with the old
-   level and strategy using deflate(strm, Z_BLOCK).  There are three approaches
-   for the compression levels 0, 1..3, and 4..9 respectively.  The new level
-   and strategy will take effect at the next call of deflate().
+   strategy is changed, and if there have been any deflate() calls since the
+   state was initialized or reset, then the input available so far is
+   compressed with the old level and strategy using deflate(strm, Z_BLOCK).
+   There are three approaches for the compression levels 0, 1..3, and 4..9
+   respectively.  The new level and strategy will take effect at the next call
+   of deflate().
 
      If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
    not have enough output space to complete, then the parameter change will not



Reply via email to