Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288769

Revert unintentional change to deflate.c

    XMLWordPrintable

Details

    Backports

      Description

        As part of the fix for JDK-8284371, there was an unintentional change which reverted the reworking of (7) deflate.c undo (6), replaced withe the official zlib repo fix see#305/#f969409

        This patch restores that change which is:

        git diff
        diff --git a/src/java.base/share/native/libzip/zlib/deflate.c b/src/java.base/share/native/libzip/zlib/deflate.c
        index ba1f386e5fc..2b80a735886 100644
        --- a/src/java.base/share/native/libzip/zlib/deflate.c
        +++ b/src/java.base/share/native/libzip/zlib/deflate.c
        @@ -555,7 +555,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);
         
        @@ -649,7 +649,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
             func = configuration_table[s->level].func;
         
             if ((strategy != s->strategy || func != configuration_table[level].func) &&
        - s->high_water) {
        + s->last_flush != -2) {
                 /* Flush the last buffer: */
                 int err = deflate(strm, Z_BLOCK);
                 if (err == Z_STREAM_ERROR)
         %

        Attachments

          Issue Links

            Activity

              People

                lancea Lance Andersen
                lancea Lance Andersen
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: