diff --git a/ChangeLog b/ChangeLog index a51be7ab17..33ff1132f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Jan 14 13:38:58 2011 NARUSE, Yui + + * 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 Jan 14 07:30:47 2011 Nobuyoshi Nakada * io.c (argf_next_argv): go advance when the next file cannot be 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"); } } diff --git a/version.h b/version.h index 5a62b244d0..babb1b7528 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 155 +#define RUBY_PATCHLEVEL 156 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1