summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-20 22:29:01 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-20 22:29:01 +0000
commit72e6e00f1c657e1fb61c5ace4bb2c35651728242 (patch)
tree9de08ab41eabe5a0ffa999886079869dfee3b148
parentb62769eab3bf33339203c3e835baa3e23b6fdfa6 (diff)
merge revision(s) 30552:
* 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@31662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/zlib/zlib.c2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cfc83036f..acefc5d224 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat May 21 00:55:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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
+
Fri May 20 23:46:44 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index c8207886f3..f52248cf47 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2090,7 +2090,7 @@ gzfile_check_footer(gz)
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");
}
}
diff --git a/version.h b/version.h
index 3abc0bf716..bda15cfaa2 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2011-05-21"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20110521
-#define RUBY_PATCHLEVEL 338
+#define RUBY_PATCHLEVEL 339
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8