diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:35:32 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:35:32 +0000 |
commit | c303d3838b9fc8cc871bc68d9428902b601a18d0 (patch) | |
tree | deb6ef6f80fabf1237025484e309ea2ca39f0064 /ext | |
parent | 849e45dee80662c4192cbe9e6ce1161ac57c8edd (diff) |
merges r30540 and r30541 from trunk into ruby_1_9_2.
--
* 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
--
The cast must use uint32_t. [ruby-core:34481]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 452f91acf2..c52ebf3020 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2106,7 +2106,7 @@ gzfile_check_footer(struct gzfile *gz) if (gz->crc != crc) { rb_raise(cCRCError, "invalid compressed data -- crc error"); } - if (gz->z.stream.total_out != length) { + if ((uint32_t)gz->z.stream.total_out != length) { rb_raise(cLengthError, "invalid compressed data -- length error"); } } |