xzyang / rpms / libxml2

Forked from rpms/libxml2 3 years ago
Clone

Blame SOURCES/libxml2-2.9.0-do-not-check-crc.patch

6dedca
diff -up libxml2-2.9.0/xzlib.c.do-not-check-crc libxml2-2.9.0/xzlib.c
6dedca
--- libxml2-2.9.0/xzlib.c.do-not-check-crc	2012-09-11 05:52:46.000000000 +0200
6dedca
+++ libxml2-2.9.0/xzlib.c	2012-11-19 19:28:42.431700534 +0100
6dedca
@@ -552,17 +552,20 @@ xz_decomp(xz_statep state)
6dedca
 #ifdef HAVE_ZLIB_H
6dedca
         if (state->how == GZIP) {
6dedca
             if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
6dedca
-                xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
6dedca
-                return -1;
6dedca
-            }
6dedca
-            if (crc != state->zstrm.adler) {
6dedca
-                xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
6dedca
-                return -1;
6dedca
-            }
6dedca
-            if (len != (state->zstrm.total_out & 0xffffffffL)) {
6dedca
-                xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
6dedca
-                return -1;
6dedca
-            }
6dedca
+                /*
6dedca
+               xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
6dedca
+               return -1;
6dedca
+                */
6dedca
+            } else {
6dedca
+               if (crc != state->zstrm.adler) {
6dedca
+                   xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
6dedca
+                   return -1;
6dedca
+               }
6dedca
+               if (len != (state->zstrm.total_out & 0xffffffffL)) {
6dedca
+                   xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
6dedca
+                   return -1;
6dedca
+               }
6dedca
+           }
6dedca
             state->strm.avail_in = 0;
6dedca
             state->strm.next_in = NULL;
6dedca
             state->strm.avail_out = 0;