xzyang / rpms / libxml2

Forked from rpms/libxml2 3 years ago
Clone

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

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