[前][次][番号順一覧][スレッド一覧]

ruby-changes:18530

From: naruse <ko1@a...>
Date: Sat, 15 Jan 2011 23:30:31 +0900 (JST)
Subject: [ruby-changes:18530] Ruby:r30552 (ruby_1_8): * ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in gzip's header

naruse	2011-01-15 23:29:50 +0900 (Sat, 15 Jan 2011)

  New Revision: 30552

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30552

  Log:
    * ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in gzip's header
      is the size of uncompressed input data modulo 2^32.
      [ruby-core:34481] http://www.ietf.org/rfc/rfc1952.txt

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/zlib/zlib.c

Index: ruby_1_8/ext/zlib/zlib.c
===================================================================
--- ruby_1_8/ext/zlib/zlib.c	(revision 30551)
+++ ruby_1_8/ext/zlib/zlib.c	(revision 30552)
@@ -2090,7 +2090,7 @@
     if (gz->crc != crc) {
 	rb_raise(cCRCError, "invalid compressed data -- crc error");
     }
-    if (gz->z.stream.total_out != length) {
+    if ((gz->z.stream.total_out & 0xFFFFFFFFUL) != length) {
 	rb_raise(cLengthError, "invalid compressed data -- length error");
     }
 }
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 30551)
+++ ruby_1_8/ChangeLog	(revision 30552)
@@ -1,3 +1,9 @@
+Sat Jan 15 06:04:00 2011  NARUSE, Yui  <naruse@r...>
+
+	* ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in gzip's
+	header is the size of uncompressed input data modulo 2^32.
+	[ruby-core:34481] http://www.ietf.org/rfc/rfc1952.txt
+
 Thu Jan  6 19:28:36 2011  NAKAMURA Usaku  <usa@r...>
 
 	* ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]