From 7182c0005c62d167770bb318dbc202e3d474a3dc Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 5 Jul 2012 19:06:18 +0000 Subject: * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zlib') 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; -- cgit v1.2.3