summaryrefslogtreecommitdiff
path: root/ext
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 /ext
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
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
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");
}
}