diff --git a/ChangeLog b/ChangeLog index 9a6cf0053f..bf2184cc81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 6 04:05:59 2012 Eric Hodel + + * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use + ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE. + Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada * internal.h: move ThreadShield declarations from intern.h. diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 73f3f7c5f0..1b651d1c08 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -679,7 +679,7 @@ zstream_expand_buffer_without_gvl(struct zstream *z) len = z->buf_filled + inc; - new_str = realloc(RSTRING(z->buf)->as.heap.ptr, len + 1); + new_str = ruby_xrealloc(RSTRING(z->buf)->as.heap.ptr, len + 1); if (!new_str) return 0;